Class: Bio::GFF::Record
Overview
Represents a single line of a GFF-formatted file. See Bio::GFF for more information.
Instance Attribute Summary collapse
-
#attributes ⇒ Object
List of tag=value pairs (e.g. to store name of the feature: ID=my_id).
-
#comments ⇒ Object
Comments for the GFF record.
-
#end ⇒ Object
End position of feature on reference sequence.
-
#feature ⇒ Object
Name of the feature.
-
#frame ⇒ Object
For features of type ‘exon’: indicates where feature begins in the reading frame.
-
#score ⇒ Object
Score of annotation (e.g. e-value for BLAST search).
-
#seqname ⇒ Object
Name of the reference sequence.
-
#source ⇒ Object
Name of the source of the feature (e.g. program that did prediction).
-
#start ⇒ Object
Start position of feature on reference sequence.
-
#strand ⇒ Object
Strand that feature is located on.
Instance Method Summary collapse
-
#initialize(str) ⇒ Record
constructor
Creates a Bio::GFF::Record object.
Constructor Details
#initialize(str) ⇒ Record
Creates a Bio::GFF::Record object. Is typically not called directly, but is called automatically when creating a Bio::GFF object.
Arguments:
-
str: a tab-delimited line in GFF format
108 109 110 111 112 113 114 |
# File 'lib/bio/db/gff.rb', line 108 def initialize(str) @comments = str.chomp[/#.*/] return if /^#/.match(str) @seqname, @source, @feature, @start, @end, @score, @strand, @frame, attributes, = str.chomp.split("\t") @attributes = parse_attributes(attributes) if attributes end |
Instance Attribute Details
#attributes ⇒ Object
List of tag=value pairs (e.g. to store name of the feature: ID=my_id)
98 99 100 |
# File 'lib/bio/db/gff.rb', line 98 def attributes @attributes end |
#comments ⇒ Object
Comments for the GFF record
101 102 103 |
# File 'lib/bio/db/gff.rb', line 101 def comments @comments end |
#end ⇒ Object
End position of feature on reference sequence
86 87 88 |
# File 'lib/bio/db/gff.rb', line 86 def end @end end |
#feature ⇒ Object
Name of the feature
80 81 82 |
# File 'lib/bio/db/gff.rb', line 80 def feature @feature end |
#frame ⇒ Object
For features of type ‘exon’: indicates where feature begins in the reading frame
95 96 97 |
# File 'lib/bio/db/gff.rb', line 95 def frame @frame end |
#score ⇒ Object
Score of annotation (e.g. e-value for BLAST search)
89 90 91 |
# File 'lib/bio/db/gff.rb', line 89 def score @score end |
#seqname ⇒ Object
Name of the reference sequence
74 75 76 |
# File 'lib/bio/db/gff.rb', line 74 def seqname @seqname end |
#source ⇒ Object
Name of the source of the feature (e.g. program that did prediction)
77 78 79 |
# File 'lib/bio/db/gff.rb', line 77 def source @source end |
#start ⇒ Object
Start position of feature on reference sequence
83 84 85 |
# File 'lib/bio/db/gff.rb', line 83 def start @start end |
#strand ⇒ Object
Strand that feature is located on
92 93 94 |
# File 'lib/bio/db/gff.rb', line 92 def strand @strand end |