Sha256: a7a9359f97543ae25fda291b87e7055ffe19e98eba38ae6891119dca9c07e7c1

Contents?: true

Size: 655 Bytes

Versions: 2

Compression:

Stored size: 655 Bytes

Contents


module Bio

  module GFFbrowser

    class GFF3ParseFile
      attr_reader :records, :sequences

      include FastLineParser
      
      def initialize fn
        @records = []
        @sequences = []
        fh = File.open(fn) 
        fh.each_line do | line |
          s = line.strip
          if s == '##FASTA'
            break
          end
          next if s.length == 0 or s[0] == '#'
          @records.push FastLineRecord.new(parse_line_fast(s))
        end
        fasta = Bio::GFF::FastaReader.new(fh)
        fasta.each do | id, fastarec |
          @sequences.push FastaRecord.new(id,fastarec)
        end
      end

    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bio-gff3-0.8.6 lib/bio/db/gff/gff3parsefile.rb
bio-gff3-0.8.5 lib/bio/db/gff/gff3parsefile.rb