class BioInterchange::Genomics::GFF3Feature
Represents a single genomic feature of a GFF3 file.
Constants
- NEGATIVE
- NOT_STRANDED
Constants determining the strand of the feature.
- POSITIVE
- UNKNOWN
Public Class Methods
Creates a new feature representation. A feature is described on one line of the GFF3 file.
sequence_id
-
an identifier that determines the coordinate system for the feature
source
-
a text description of the origin of this feature description
type
-
either a
SOFA
accession,SOFA
term, or textual description (the former are URIs, the latter is a string) start_coordinate
-
an integer denoting the start coordinate of the feature
end_coordinate
-
an integer denoting the end coordinate of the feature, which is equal or larger than the start coordinate
score
-
a floating point score
strand
-
a constant determining whether the feature is
NOT_STRANDED
, the strand isUNKNOWN
, or the feature is on thePOSITIVE
orNEGATIVE
strand phase
-
an integer determining the phase of the feature, if the feature has a phase
attributes
-
a map of additional attributes associated with the feature
# File lib/biointerchange/genomics/gff3_feature.rb, line 23 def initialize(sequence_id, source, type, start_coordinate, end_coordinate, score = nil, strand = NOT_STRANDED, phase = nil, attributes = {}) @sequence_id = sequence_id @source = source @type = type @start_coordinate = start_coordinate @end_coordinate = end_coordinate @score = score @strand = strand @phase = phase @attributes = attributes end
Public Instance Methods
Returns a map of additional attributes for this feature.
# File lib/biointerchange/genomics/gff3_feature.rb, line 76 def attributes @attributes.freeze end
Returns the end coordinate of the feature. The end coordinate is equal or larger than the start coordinate.
# File lib/biointerchange/genomics/gff3_feature.rb, line 56 def end_coordinate @end_coordinate end
Returns the phase, if existing, for this feature.
# File lib/biointerchange/genomics/gff3_feature.rb, line 71 def phase @phase end
Returns the score of the feature. The score is a floating point number, which ideally is an E-value or P-value.
# File lib/biointerchange/genomics/gff3_feature.rb, line 61 def score @score end
Returns the sequence ID that determines the coordinate system for the feature.
# File lib/biointerchange/genomics/gff3_feature.rb, line 36 def sequence_id @sequence_id end
Returns a textual description that determines the origin of this feature.
# File lib/biointerchange/genomics/gff3_feature.rb, line 41 def source @source end
Returns the start coordinate of the feature. The start coordinate is equal or smaller than the end coordinate.
# File lib/biointerchange/genomics/gff3_feature.rb, line 51 def start_coordinate @start_coordinate end
Returns the strand the feature is located on.
# File lib/biointerchange/genomics/gff3_feature.rb, line 66 def strand @strand end
Returns the feature type, which can either be a SOFA
URI or a textual description otherwise.
# File lib/biointerchange/genomics/gff3_feature.rb, line 46 def type @type end