class MgNu::Parser::GFF::Record
class to deal with each line (record) of data
Attributes
attributes[RW]
end[RW]
feature[RW]
frame[RW]
name[RW]
score[RW]
seqname[RW]
source[RW]
start[RW]
strand[RW]
Public Class Methods
new(line)
click to toggle source
# File lib/mgnu/parser/gff.rb, line 35 def initialize(line) @name, @source, @feature, @start, @end, @score, @strand, @frame, @attributes = line.split("\t") @attributes = parse_attributes(attributes) if attributes end
Private Instance Methods
parse_attributes(attributes)
click to toggle source
# File lib/mgnu/parser/gff.rb, line 45 def parse_attributes(attributes) hash = Hash.new attributes.split(/[^\\];/).each do |atr| key, value = atr.split(' ', 2) hash[key] = value end hash end