[BioRuby-cvs] bioruby/lib/bio sequence.rb,0.54,0.55

Katayama Toshiaki k at pub.open-bio.org
Tue Feb 14 13:46:45 UTC 2006


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

Modified Files:
	sequence.rb 
Log Message:
* Bio::Sequence.auto(str) is changed to return Bio::Sequence object
  instead of NA or AA object
* Bio::Sequence#auto is added to replace the value of @seq with
  guessed type of Bio::Sequence::?A object


Index: sequence.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence.rb,v
retrieving revision 0.54
retrieving revision 0.55
diff -C2 -d -r0.54 -r0.55
*** sequence.rb	14 Feb 2006 13:12:06 -0000	0.54
--- sequence.rb	14 Feb 2006 13:46:42 -0000	0.55
***************
*** 48,59 ****
    end
  
!   def self.auto(str)
!     @moltype = self.guess(str)
      if @moltype == NA
!       @seq = NA.new(str)
      else
!       @seq = AA.new(str)
      end
!     return @seq
    end
  
--- 48,64 ----
    end
  
!   def auto
!     @moltype = guess
      if @moltype == NA
!       @seq = NA.new(@seq)
      else
!       @seq = AA.new(@seq)
      end
!   end
! 
!   def self.auto(str)
!     seq = self.new(str)
!     seq.auto
!     return seq
    end
  




More information about the bioruby-cvs mailing list