Class: Bio::GFFbrowser::FastLineRecord
Overview
Using the fast line parser
Instance Method Summary
collapse
#parse_attributes_fast, #parse_line_fast
#debug, #error, #info, #log_sys_info, #warn
Constructor Details
Returns a new instance of FastLineRecord.
15
16
17
|
# File 'lib/bio/db/gff/gffrecord.rb', line 15
def initialize fields
@fields = fields
end
|
Instance Method Details
#attributes ⇒ Object
60
61
62
|
# File 'lib/bio/db/gff/gffrecord.rb', line 60
def attributes
@attributes_ ||= parse_attributes_fast(@fields[GFF3_ATTRIBUTES])
end
|
19
20
21
|
# File 'lib/bio/db/gff/gffrecord.rb', line 19
def
false
end
|
#end ⇒ Object
39
40
41
|
# File 'lib/bio/db/gff/gffrecord.rb', line 39
def end
@end_ ||= @fields[GFF3_END].to_i
end
|
#feature ⇒ Object
Also known as:
feature_type
51
52
53
|
# File 'lib/bio/db/gff/gffrecord.rb', line 51
def feature
@feature_ ||= @fields[GFF3_TYPE]
end
|
#get_attribute(name) ⇒ Object
64
65
66
|
# File 'lib/bio/db/gff/gffrecord.rb', line 64
def get_attribute name
attributes[name]
end
|
#id ⇒ Object
Also known as:
entry_id
68
69
70
|
# File 'lib/bio/db/gff/gffrecord.rb', line 68
def id
@id_ ||= attributes['ID']
end
|
#phase ⇒ Object
Also known as:
frame
29
30
31
|
# File 'lib/bio/db/gff/gffrecord.rb', line 29
def phase
@phase_ ||= @fields[GFF3_PHASE].to_i
end
|
#score ⇒ Object
43
44
45
|
# File 'lib/bio/db/gff/gffrecord.rb', line 43
def score
@score_ ||= @fields[GFF3_SCORE].to_f
end
|
#seqid ⇒ Object
Also known as:
seqname
23
24
25
|
# File 'lib/bio/db/gff/gffrecord.rb', line 23
def seqid
@seqid_ ||= @fields[GFF3_SEQID]
end
|
#source ⇒ Object
56
57
58
|
# File 'lib/bio/db/gff/gffrecord.rb', line 56
def source
@fields[GFF3_SOURCE]
end
|
#start ⇒ Object
35
36
37
|
# File 'lib/bio/db/gff/gffrecord.rb', line 35
def start
@start_ ||= @fields[GFF3_START].to_i
end
|
#strand ⇒ Object
47
48
49
|
# File 'lib/bio/db/gff/gffrecord.rb', line 47
def strand
@fields[GFF3_STRAND]
end
|