Class: BioInterchange::Genomics::GFF3FeatureSequence

Inherits:
Object
  • Object
show all
Defined in:
lib/biointerchange/genomics/gff3_feature_sequence.rb

Overview

Represents a sequence of a genomic feature of a GFF3 file.

Instance Method Summary collapse

Constructor Details

#initialize(feature_id, sequence, comment = nil) ⇒ GFF3FeatureSequence

Creates a new feature sequence representation. A feature sequence is described by two or more lines in a GFF3 file that are succeeding a ‘##FASTA’ pragma statement.

feature_id

ID of the feature whose sequence is stored

sequence

sequence of the feature



11
12
13
14
15
# File 'lib/biointerchange/genomics/gff3_feature_sequence.rb', line 11

def initialize(feature_id, sequence, comment = nil)
  @feature_id = feature_id
  @sequence = sequence
  @comment = comment
end

Instance Method Details

#commentObject

Returns additional comments – if provided – that are associated with the feature ID. If no comment was provided, then ‘nil` is returned.



29
30
31
# File 'lib/biointerchange/genomics/gff3_feature_sequence.rb', line 29

def comment
  @comment
end

#feature_idObject

Returns the ID of the feature whose sequence is represented by the object.



18
19
20
# File 'lib/biointerchange/genomics/gff3_feature_sequence.rb', line 18

def feature_id
  @feature_id
end

#sequenceObject

Returns the sequence of the feature.



23
24
25
# File 'lib/biointerchange/genomics/gff3_feature_sequence.rb', line 23

def sequence
  @sequence
end