Class: Bio::GFF::Record
Overview
Represents a single line of a GFF-formatted file. See Bio::GFF for more information.
Instance Attribute Summary (collapse)
-
- (Object) attributes
List of tag=value pairs (e.g. to store name of the feature: ID=my_id).
-
- (Object) comment
Comments for the GFF record.
-
- (Object) end
End position of feature on reference sequence.
-
- (Object) feature
Name of the feature.
-
- (Object) frame
For features of type 'exon': indicates where feature begins in the reading frame.
-
- (Object) score
Score of annotation (e.g. e-value for BLAST search).
-
- (Object) seqname
Name of the reference sequence.
-
- (Object) source
Name of the source of the feature (e.g. program that did prediction).
-
- (Object) start
Start position of feature on reference sequence.
-
- (Object) strand
Strand that feature is located on.
Instance Method Summary (collapse)
-
- (Object) comments
"comments" is deprecated.
-
- (Object) comments=(str)
"comments=" is deprecated.
-
- (Record) initialize(str)
constructor
Creates a Bio::GFF::Record object.
Constructor Details
- (Record) initialize(str)
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
125 126 127 128 129 130 131 |
# File 'lib/bio/db/gff.rb', line 125 def initialize(str) @comment = 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
- (Object) attributes
List of tag=value pairs (e.g. to store name of the feature: ID=my_id)
103 104 105 |
# File 'lib/bio/db/gff.rb', line 103 def attributes @attributes end |
- (Object) comment
Comments for the GFF record
106 107 108 |
# File 'lib/bio/db/gff.rb', line 106 def comment @comment end |
- (Object) end
End position of feature on reference sequence
91 92 93 |
# File 'lib/bio/db/gff.rb', line 91 def end @end end |
- (Object) feature
Name of the feature
85 86 87 |
# File 'lib/bio/db/gff.rb', line 85 def feature @feature end |
- (Object) frame
For features of type 'exon': indicates where feature begins in the reading frame
100 101 102 |
# File 'lib/bio/db/gff.rb', line 100 def frame @frame end |
- (Object) score
Score of annotation (e.g. e-value for BLAST search)
94 95 96 |
# File 'lib/bio/db/gff.rb', line 94 def score @score end |
- (Object) seqname
Name of the reference sequence
79 80 81 |
# File 'lib/bio/db/gff.rb', line 79 def seqname @seqname end |
- (Object) source
Name of the source of the feature (e.g. program that did prediction)
82 83 84 |
# File 'lib/bio/db/gff.rb', line 82 def source @source end |
- (Object) start
Start position of feature on reference sequence
88 89 90 |
# File 'lib/bio/db/gff.rb', line 88 def start @start end |
- (Object) strand
Strand that feature is located on
97 98 99 |
# File 'lib/bio/db/gff.rb', line 97 def strand @strand end |
Instance Method Details
- (Object) comments
"comments" is deprecated. Instead, use "comment".
109 110 111 112 |
# File 'lib/bio/db/gff.rb', line 109 def comments #warn "#{self.class.to_s}#comments is deprecated. Instead, use \"comment\"." if $VERBOSE self.comment end |
- (Object) comments=(str)
"comments=" is deprecated. Instead, use "comment=".
115 116 117 118 |
# File 'lib/bio/db/gff.rb', line 115 def comments=(str) #warn "#{self.class.to_s}#comments= is deprecated. Instead, use \"comment=\"." if $VERBOSE self.comment = str end |