Simple class representing a file of Fasta format sequences and each ones length
# File lib/bio/util/bio-gngm.rb, line 20 def initialize(args) @file = args[:file] @seqs = {} file = Bio::FastaFormat.open(@file) file.each do |entry| @seqs[entry.entry_id] = entry.length end def each @seqs.keys.sort.each do |k| yield k, @seqs[k] end end end
# File lib/bio/util/bio-gngm.rb, line 28 def each @seqs.keys.sort.each do |k| yield k, @seqs[k] end end