Class: Bio::GFFbrowser::GFF3

Inherits:
Object
  • Object
show all
Includes:
Block, Digest
Defined in:
lib/bio/db/gff/gff3.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filename, options = {}) ⇒ GFF3

Initialize a GFF parser



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/bio/db/gff/gff3.rb', line 24

def initialize filename, options = {}
  options[:parser] = :line if options[:parser] == nil
  cache_recs    = options[:cache_records]
  @assembler = 
    if options[:block]
      GffBlockParser.new(filename, options)
    else 
      case cache_recs
        when :cache_none 
          NoCache.new(filename, options)
        when :cache_lru
          LruCache.new(filename, options)
        else
          InMemory.new(filename, options)  # default 
      end
    end
end

Instance Attribute Details

#assemblerObject (readonly)

Returns the value of attribute assembler.



18
19
20
# File 'lib/bio/db/gff/gff3.rb', line 18

def assembler
  @assembler
end