Sha256: 4569014b370cb35b066248019f8af21bfd0d635602e43ffb6aab1f56e485ccc8

Contents?: true

Size: 926 Bytes

Versions: 7

Compression:

Stored size: 926 Bytes

Contents

module BioInterchange::Genomics

# Represents a sequence of a genomic feature of a GFF3 file.
class 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
  def initialize(feature_id, sequence, comment = nil)
    @feature_id = feature_id
    @sequence = sequence
    @comment = comment
  end

  # Returns the ID of the feature whose sequence is represented by the object.
  def feature_id
    @feature_id
  end

  # Returns the sequence of the feature.
  def sequence
    @sequence
  end

  # Returns additional comments -- if provided -- that are associated with the feature ID.
  # If no comment was provided, then `nil` is returned.
  def comment
    @comment
  end

end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
biointerchange-1.0.8 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.7 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.6 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.5 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.4 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.2 lib/biointerchange/genomics/gff3_feature_sequence.rb
biointerchange-1.0.1 lib/biointerchange/genomics/gff3_feature_sequence.rb