[BioRuby-cvs] bioruby/lib/bio sequence.rb,0.51,0.52
Katayama Toshiaki
k at pub.open-bio.org
Mon Feb 6 14:10:03 UTC 2006
Update of /home/repository/bioruby/bioruby/lib/bio
In directory pub.open-bio.org:/tmp/cvs-serv1865
Modified Files:
sequence.rb
Log Message:
* changed to use autoload
* send to @seq when method_missing
* format_* methods are moved under the module Bio::Sequence::Format
* added skelton for output(:gff) to call Bio::Sequence::Format#format_gff
Index: sequence.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/lib/bio/sequence.rb,v
retrieving revision 0.51
retrieving revision 0.52
diff -C2 -d -r0.51 -r0.52
*** sequence.rb 23 Jan 2006 04:13:36 -0000 0.51
--- sequence.rb 6 Feb 2006 14:10:01 -0000 0.52
***************
*** 29,60 ****
#
- require 'bio/data/na'
- require 'bio/data/aa'
- require 'bio/data/codontable'
- require 'bio/location'
-
- require 'bio/sequence/common'
- require 'bio/sequence/na'
- require 'bio/sequence/aa'
- require 'bio/sequence/format'
require 'bio/sequence/compat'
module Bio
- # Nucleic/Amino Acid sequence
-
class Sequence
attr_accessor :entry_id, :definition, :features, :references, :comments,
:date, :keywords, :dblinks, :taxonomy, :moltype, :seq
! # def method_missing(*arg)
! # @seq.send(*arg)
! # end
def output(style)
case style
when :fasta
format_fasta
when :genbank
format_genbank
--- 29,62 ----
#
require 'bio/sequence/compat'
module Bio
class Sequence
+ def initialize(str)
+ @seq = str
+ end
+
+ def method_missing(*arg)
+ @seq.send(*arg)
+ end
+
attr_accessor :entry_id, :definition, :features, :references, :comments,
:date, :keywords, :dblinks, :taxonomy, :moltype, :seq
! autoload :Common, 'bio/sequence/common'
! autoload :NA, 'bio/sequence/na'
! autoload :AA, 'bio/sequence/aa'
! autoload :Generic, 'bio/sequence/generic'
! autoload :Format, 'bio/sequence/format'
def output(style)
+ extend Bio::Sequence::Format
case style
when :fasta
format_fasta
+ when :gff
+ format_gff
when :genbank
format_genbank
***************
*** 62,69 ****
format_embl
end
- end
-
- def initialize(str)
- @seq = str
end
--- 64,67 ----
More information about the bioruby-cvs
mailing list