[BioRuby-cvs] bioruby/lib/bio/appl clustalw.rb,1.7,1.8

Naohisa Goto ngoto at pub.open-bio.org
Mon Oct 31 14:46:21 EST 2005


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

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


Index: clustalw.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/clustalw.rb,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** clustalw.rb	9 Sep 2005 15:52:57 -0000	1.7
--- clustalw.rb	31 Oct 2005 19:46:19 -0000	1.8
***************
*** 1,7 ****
  #
! # bio/appl/clustalw.rb - CLUSTAL W wrapper class
  #
! #   Copyright (C) 2003 GOTO Naohisa <ngoto at gen-info.osaka-u.ac.jp>
  #
  #  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/clustalw.rb - CLUSTAL W wrapper class
  #
! # Copyright:: Copyright (C) 2003 GOTO Naohisa <ngoto at gen-info.osaka-u.ac.jp>
! # 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,23 ****
--- 19,41 ----
  #  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$
  #
+ # Bio::ClustalW is a CLUSTAL W execution wrapper class.
+ # Its object is also called an alignment factory.
+ # CLUSTAL W is a very popular software for multiple sequence alignment.
+ #
+ # == References
+ #
+ # * Thompson,J.D., Higgins,D.G. and Gibson,T.J..
+ #   CLUSTAL W: improving the sensitivity of progressive multiple sequence
+ #   alignment through sequence weighting, position-specific gap penalties
+ #   and weight matrix choice. Nucleic Acids Research, 22:4673-4680, 1994.
+ #   http://nar.oxfordjournals.org/cgi/content/abstract/22/22/4673
+ # * http://www.ebi.ac.uk/clustalw/
+ # * ftp://ftp.ebi.ac.uk/pub/software/unix/clustalw/
+ #
+ 
  
  require 'tempfile'
***************
*** 27,35 ****
  require 'bio/alignment'
  
! module Bio
    class ClustalW
  
      autoload :Report, 'bio/appl/clustalw/report'
  
      def initialize(program = 'clustalw', option = [])
        @program = program
--- 45,58 ----
  require 'bio/alignment'
  
! module Bio #:nodoc:
! 
!   # Bio::ClustalW is a CLUSTAL W execution wrapper class.
!   # Its object is also called an alignment factory.
!   # CLUSTAL W is a very popular software for multiple sequence alignment.
    class ClustalW
  
      autoload :Report, 'bio/appl/clustalw/report'
  
+     # Creates a new CLUSTAL W execution wrapper object (alignment factory).
      def initialize(program = 'clustalw', option = [])
        @program = program
***************
*** 40,47 ****
        @log = nil
      end
-     attr_accessor :program, :option
-     attr_reader :command, :log
-     attr_reader :output, :report
  
      def query(seqs)
        if seqs then
--- 63,92 ----
        @log = nil
      end
  
+     # name of the program (usually 'clustalw' in UNIX)
+     attr_accessor :program
+ 
+     # options
+     attr_accessor :option
+ 
+     # Returns last command-line strings executed by this factory.
+     # Note that filenames described in the command-line may already
+     # be removed because they are temporary files.
+     # Returns an array.
+     attr_reader :command
+ 
+     # Returns last messages of CLUSTAL W execution.
+     attr_reader :log
+ 
+     # Returns last raw alignment result (String).
+     attr_reader :output
+ 
+     # Returns last alignment result.
+     # Returns a Bio::ClustalW::Report object.
+     attr_reader :report
+ 
+     # Executes the program(clustalw).
+     # If +seqs+ is not nil, perform alignment for seqs.
+     # If +seqs+ is nil, simply executes CLUSTAL W.
      def query(seqs)
        if seqs then
***************
*** 52,57 ****
      end
  
      def query_align(seqs)
-       # seqs should be Bio::Alignment or Array of sequences or nil
        seqtype = nil
        unless seqs.is_a?(Bio::Alignment)
--- 97,103 ----
      end
  
+     # Performs alignment for +seqs+.
+     # +seqs+ should be Bio::Alignment or Array of sequences or nil.
      def query_align(seqs)
        seqtype = nil
        unless seqs.is_a?(Bio::Alignment)
***************
*** 69,72 ****
--- 115,120 ----
      end
  
+     # Performs alignment for +str+.
+     # +str+ should be a string that can be recognized by CLUSTAL W.
      def query_string(str, *arg)
        begin
***************
*** 81,84 ****
--- 129,133 ----
      end
  
+     # Performs alignment of sequences in the file named +path+.
      def query_by_filename(path, seqtype = nil)
        require 'bio/appl/clustalw/report'
***************
*** 107,114 ****
--- 156,168 ----
        @report
      end
+ 
+     # Returns last alignment guild-tree (file.dnd).
      attr_reader :output_dnd
  
+     # Returns last error messages (to stderr) of CLUSTAL W execution.
      attr_reader :errorlog
+ 
      private
+     # Executes the program in the local machine.
      def exec_local(opt)
        @command = [ @program,  *opt ]
***************
*** 136,198 ****
  end #module Bio
  
- =begin
- 
- = Bio::ClustalW
- 
- --- Bio::ClustalW.new(path_to_clustalw = 'clustalw', option = [])
- 
-       Creates new alignment factory.
- 
- --- Bio::ClustalW#program
- --- Bio::ClustalW#option
- 
-       Access to the variables specified in Bio::ClustalW.new.
- 
- --- Bio::ClustalW#query(seqs)
- 
-       Executes the program(clustalw).
-       If 'seqs' is not nil, perform alignment for seqs.
-       If 'seqs' is nil, simply executes CLUSTAL W.
- 
- --- Bio::ClustalW#query_align(seqs)
- 
-       Performs alignment for seqs.
- 
- --- Bio::ClustalW#query_string(str)
- 
-       Performs alignment for str.
-       Str should be a string that can be recognized by CLUSTAL W.
- 
- --- Bio::ClustalW#query_by_filename(filename)
- 
-       Performs alignment of sequences in the file named filename.
- 
- --- Bio::ClustalW#command
- 
-       Shows latest command-line executed by this factory.
-       Note that filenames described in the command-line may already
-       be removed because they are temporary files.
-       Returns an array.
- 
- --- Bio::ClustalW#log
- 
-       Shows latest messages of CLUSTAL W execution.
- 
- --- Bio::ClustalW#report
- 
-       Shows latest alignment result (instance of Bio::ClustalW::Report)
-       performed by this factory.
- 
- --- Bio::ClustalW#output
- 
-       Shows latest raw alignment result (String).
- 
- --- Bio::ClustalW#output_dnd
- 
-       Shows latest alignment guild-tree (filename.dnd).
- 
- --- Bio::ClustalW#errorlog
- 
-       Shows latest error messages (thourgh stderr) of CLUSTAL W execution.
- 
- =end
--- 190,191 ----



More information about the bioruby-cvs mailing list