Module: Bio::GFFbrowser::Digest::LruCacheHelpers::SeekRec

Defined in:
lib/bio/db/gff/digest/gfflrucache.rb

Overview

Module to fetch a line from GFF3 file and returns a parsed record

Class Method Summary collapse

Class Method Details

.fetch(fh, fpos, parser) ⇒ Object

Fetch a record using fh and file seek position



28
29
30
31
32
33
34
35
36
# File 'lib/bio/db/gff/digest/gfflrucache.rb', line 28

def SeekRec::fetch(fh,fpos,parser)
  return nil if fh==nil or fpos==nil
  fh.seek(fpos)
  if parser == :bioruby 
    GFF::GFF3::BioRubyFileRecord.new(fpos, fh.gets)
  else
    GFF::GFF3::FastParserFileRecord.new(fpos, fh.gets)
  end
end