[BioRuby-cvs] bioruby/lib/bio/db fasta.rb,1.23,1.24

Naohisa Goto ngoto at pub.open-bio.org
Tue Feb 14 13:42:42 UTC 2006


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

Modified Files:
	fasta.rb 
Log Message:
added to_seq method which returns a Bio::Sequence object


Index: fasta.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/db/fasta.rb,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** fasta.rb	9 Feb 2006 03:28:48 -0000	1.23
--- fasta.rb	14 Feb 2006 13:42:40 -0000	1.24
***************
*** 244,247 ****
--- 244,261 ----
      end
  
+     # Returns sequence as a Bio::Sequence object.
+     #
+     # Note: If you modify the returned Bio::Sequence object,
+     # the sequence or definition in this FastaFormat object
+     # might also be changed (but not always be changed)
+     # because of efficiency.
+     # 
+     def to_seq
+       seq
+       obj = Bio::Sequence.new(@seq)
+       obj.definition = self.definition
+       obj
+     end
+ 
      # Parsing FASTA Defline, and extract IDs.
      # IDs are NSIDs (NCBI standard FASTA sequence identifiers)




More information about the bioruby-cvs mailing list