Class | Bio::GFF::GFF2 |
In: |
lib/bio/db/gff.rb
|
Parent: | GFF |
VERSION | = | 2 |
gff_version | [R] | GFF2 version string (String or nil). nil means "2". |
metadata | [RW] | Metadata (except "#gff-version"). Must be an array of Bio::GFF::GFF2::MetaData objects. |
Creates a Bio::GFF::GFF2 object by building a collection of Bio::GFF::GFF2::Record (and metadata) objects.
Arguments:
Returns: | Bio::GFF::GFF2 object |
# File lib/bio/db/gff.rb, line 823 823: def initialize(str = nil) 824: @gff_version = nil 825: @records = [] 826: @metadata = [] 827: parse(str) if str 828: end
Parses a GFF2 entries, and concatenated the parsed data.
Arguments:
Returns: | self |
# File lib/bio/db/gff.rb, line 843 843: def parse(str) 844: # parses GFF lines 845: str.each_line do |line| 846: if /^\#\#([^\s]+)/ =~ line then 847: parse_metadata($1, line) 848: else 849: @records << GFF2::Record.new(line) 850: end 851: end 852: self 853: end