[BioRuby-cvs] bioruby/lib/bio/appl/mafft report.rb,1.10,1.11

Naohisa Goto ngoto at dev.open-bio.org
Fri Dec 15 16:23:20 UTC 2006


Update of /home/repository/bioruby/bioruby/lib/bio/appl/mafft
In directory dev.open-bio.org:/tmp/cvs-serv20151/lib/bio/appl/mafft

Modified Files:
	report.rb 
Log Message:
INCOMAPTIBLE CHANGE: Bio::MAFFT::Report#initialize now gets string of
multi-fasta formmatted text instead of Array.


Index: report.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/appl/mafft/report.rb,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** report.rb	14 Dec 2006 15:22:05 -0000	1.10
--- report.rb	15 Dec 2006 16:23:18 -0000	1.11
***************
*** 23,26 ****
--- 23,27 ----
  #
  
+ require 'stringio'
  require 'bio/db/fasta'
  require 'bio/io/flatfile'
***************
*** 39,48 ****
  
        # Creates a new Report object.
!       # +ary+ should be an Array of Bio::FastaFormat.
        # +seqclass+ should on of following:
        # Class:  Bio::Sequence::AA, Bio::Sequence::NA, ...
        # String: 'PROTEIN', 'DNA', ...
!       def initialize(ary, seqclass = nil)
!         @data = ary
          @align = nil
          case seqclass
--- 40,58 ----
  
        # Creates a new Report object.
!       # +str+ should be multi-fasta formatted text as a string.
        # +seqclass+ should on of following:
        # Class:  Bio::Sequence::AA, Bio::Sequence::NA, ...
        # String: 'PROTEIN', 'DNA', ...
!       #
!       # Compatibility Note: the old usage (to get array of Bio::FastaFormat
!       # objects) is deprecated.
!       def initialize(str, seqclass = nil)
!         if str.is_a?(Array) then
!           warn "Array of Bio::FastaFormat objects will be no longer accepted."
!           @data = str
!         else
!           ff = Bio::FlatFile.new(Bio::FastaFormat, StringIO.new(str))
!           @data = ff.to_a
!         end
          @align = nil
          case seqclass




More information about the bioruby-cvs mailing list