[BioRuby-cvs] bioruby/lib/bio/appl sim4.rb,1.2,1.3

Naohisa Goto ngoto at pub.open-bio.org
Mon Oct 31 15:03:43 EST 2005


Update of /home/repository/bioruby/bioruby/lib/bio/appl
In directory pub.open-bio.org:/tmp/cvs-serv4569

Modified Files:
	sim4.rb 
Log Message:
Changed document format from RD to RDoc.
Added references in document.


Index: sim4.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/sim4.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sim4.rb	9 Sep 2005 15:58:42 -0000	1.2
--- sim4.rb	31 Oct 2005 20:03:41 -0000	1.3
***************
*** 1,7 ****
  #
! # bio/appl/sim4.rb - sim4 wrapper class
  #
! #   Copyright (C) 2004 GOTO Naohisa <ng at bioruby.org>
  #
  #  This library is free software; you can redistribute it and/or
  #  modify it under the terms of the GNU Lesser General Public
--- 1,9 ----
  #
! # = bio/appl/sim4.rb - sim4 wrapper class
  #
! # Copyright:: Copyright (C) 2004 GOTO Naohisa <ng at bioruby.org>
! # Licence::   LGPL
  #
+ #--
  #  This library is free software; you can redistribute it and/or
  #  modify it under the terms of the GNU Lesser General Public
***************
*** 17,32 ****
  #  License along with this library; if not, write to the Free Software
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
  #
  #  $Id$
  #
  
  require 'open3'
  require 'tempfile'
  
! module Bio
    class Sim4
  
      autoload :Report,       'bio/appl/sim4/report'
  
      def initialize(program = 'sim4', database = nil, option = [])
        @program = program
--- 19,49 ----
  #  License along with this library; if not, write to the Free Software
  #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
+ #++
  #
  #  $Id$
  #
+ # The sim4 execution wrapper class.
+ #
+ # == References
+ #
+ # * Florea, L., et al., A Computer program for aligning a cDNA sequence
+ #   with a genomic DNA sequence, Genome Research, 8, 967--974, 1998.
+ #   http://www.genome.org/cgi/content/abstract/8/9/967
+ #
  
  require 'open3'
  require 'tempfile'
  
! module Bio #:nodoc:
! 
!   # The sim4 execution wrapper class.
    class Sim4
  
      autoload :Report,       'bio/appl/sim4/report'
  
+     # Creates a new sim4 execution wrapper object.
+     # [+program+]  Program name. Usually 'sim4' in UNIX.
+     # [+database+] Default file name of database('seq2').
+     # [+option+]   Options (array of strings).
      def initialize(program = 'sim4', database = nil, option = [])
        @program = program
***************
*** 38,46 ****
        @log = nil
      end
      attr_accessor :database
-     attr_reader :program, :option
-     attr_reader :command, :log
-     attr_reader :output, :report
  
      def query(seq1)
        tf = Tempfile.open('sim4')
--- 55,83 ----
        @log = nil
      end
+ 
+     # default file name of database('seq2')
      attr_accessor :database
  
+     # name of the program (usually 'sim4' in UNIX)
+     attr_reader :program
+ 
+     # options
+     attr_reader :option
+ 
+     # last command-line strings executed by the object
+     attr_reader :command
+ 
+     # last messages of program reported to the STDERR
+     attr_reader :log
+ 
+     # last result text (String)
+     attr_reader :output
+ 
+     # last result. Returns a Bio::Sim4::Report object.
+     attr_reader :report
+ 
+     # Executes the sim4 program.
+     # <tt>seq1</tt> shall be a Bio::Sequence object.
+     # Returns a Bio::Sim4::Report object.
      def query(seq1)
        tf = Tempfile.open('sim4')
***************
*** 52,55 ****
--- 89,96 ----
      end
  
+     # Executes the sim4 program.
+     # Perform mRNA-genome alignment between given sequences.
+     # <tt>seq1</tt> and <tt>seq2</tt> should be Bio::Sequence objects.
+     # Returns a Bio::Sim4::Report object.
      def query_pairwise(seq1, seq2)
        tf = Tempfile.open('sim4')
***************
*** 65,68 ****
--- 106,113 ----
      end
  
+     # Executes the sim4 program.
+     # Perform mRNA-genome alignment between sequences in given files.
+     # <tt>filename1</tt> and <tt>filename2</tt> should be file name strings.
+     # If <tt>filename2</tt> is not specified, using <tt>self.database</tt>.
      def exec_local(filename1, filename2 = nil)
        @command = [ @program, filename1, (filename2 or @database), *@option ]
***************
*** 87,147 ****
    end #class Sim4
  end #module Bio
- 
- =begin
- 
- = Bio::Sim4
- 
-   Sim4 wrapper.
- 
- --- Bio::Sim4.new(program = 'sim4', database = nil, option = [])
- 
-       Creates new wrapper.
-         program: program name (String)
-         database: default file name of database('seq2') (String)
-         option: options (Array of String)
- 
- --- Bio::Sim4#database
- --- Bio::Sim4#program
- --- Bio::Sim4#option
- 
-       Access to the variables specified in initialize.
- 
- --- Bio::Sim4#query(seq)
- 
-       Executes the program(sim4).
-         seq: Bio::Sequence object
-       Returns a Bio::Sim4::Report object.
- 
- --- Bio::Sim4#query_pairwise(seq1, seq2)
- 
-       Executes the program(sim4).
-       Perform mRNA-genome alignment between given sequences.
-         seq1: Bio::Sequence object
-         seq2: Bio::Sequence object
-       Returns a Bio::Sim4::Report object.
- 
- --- Bio::Sim4#exec(filename1, filename2 = nil)
- 
-       Executes the program(sim4).
-         filename1: file name (String)
-         filename2: file name (String)
-                    If not specified, using self.database.
- 
- --- Bio::Sim4#command
- 
-       Shows latest command-line executed by this class.
- 
- --- Bio::Sim4#log
- 
-       Shows latest messages of program reported to stderr.
- 
- --- Bio::Sim4#report
- 
-       Shows latest result (Bio::Sim4::Report object)
- 
- --- Bio::Sim4#output
- 
-       Shows latest raw result.
- 
- =end
  
--- 132,134 ----



More information about the bioruby-cvs mailing list