bpp-seq-omics  2.2.0
bpp::SequenceFeature Class Referenceabstract

The base interface for sequence features. More...

#include <Bpp/Seq/Feature/SequenceFeature.h>

+ Inheritance diagram for bpp::SequenceFeature:
+ Collaboration diagram for bpp::SequenceFeature:

Public Member Functions

virtual SequenceFeatureclone () const =0
 
virtual const std::string & getId () const =0
 
virtual void setId (const std::string &id)=0
 
virtual const std::string & getSequenceId () const =0
 
virtual void setSequenceId (const std::string &id)=0
 
virtual const std::string & getSource () const =0
 
virtual void setSource (const std::string &source)=0
 
virtual const std::string & getType () const =0
 
virtual void setType (const std::string &type)=0
 
virtual const size_t getStart () const =0
 
virtual const size_t getEnd () const =0
 
virtual bool isStranded () const =0
 
virtual bool isNegativeStrand () const =0
 
virtual void invert ()=0
 
virtual SeqRange getRange () const =0
 
virtual bool overlap (const SequenceFeature &feat) const =0
 
virtual const double & getScore () const =0
 
virtual void setScore (double score)=0
 
virtual const std::string & getAttribute (const std::string &attribute) const =0
 
virtual std::string & getAttribute (const std::string &attribute)=0
 
virtual std::set< std::string > getAttributeList () const =0
 
virtual void setAttribute (const std::string &attribute, const std::string &value)=0
 Set the value of an attribute. More...
 
virtual void removeAttribute (const std::string &attribute)=0
 

Static Public Attributes

static const std::string NO_ATTRIBUTE_SET = ""
 

Detailed Description

The base interface for sequence features.

This interface provides the most generic information common to all features, that is:

  • sequence reference
  • procedure used to generate the information
  • start and end positions. Coordinates are 0-based, of type [a,b[, so that if a==b, the annotation is considered empty. A one-character annotation is then noted as start=12(included),end=13(excluded) for instance.

Subclasses inheriting this interface provide specialisations for various types of annotations. Depending on the file format of annotations, not all types of annotations may be supported.

Author
Julien Dutheil

Definition at line 126 of file SequenceFeature.h.

Member Function Documentation

◆ clone()

virtual SequenceFeature* bpp::SequenceFeature::clone ( ) const
pure virtual

◆ getAttribute() [1/2]

virtual const std::string& bpp::SequenceFeature::getAttribute ( const std::string &  attribute) const
pure virtual
Parameters
attributeThe name of the attribute to retrieve.
Returns
The attribute with specified name (read only).

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getAttribute() [2/2]

virtual std::string& bpp::SequenceFeature::getAttribute ( const std::string &  attribute)
pure virtual
Parameters
attributeThe name of the attribute to retrieve.
Returns
The attribute with specified name.

Implemented in bpp::BasicSequenceFeature.

◆ getAttributeList()

virtual std::set< std::string > bpp::SequenceFeature::getAttributeList ( ) const
pure virtual
Returns
The list of all attributes available.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getEnd()

virtual const size_t bpp::SequenceFeature::getEnd ( ) const
pure virtual
Returns
The ending position of the feature, 0-based, excluded.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getId()

virtual const std::string& bpp::SequenceFeature::getId ( ) const
pure virtual
Returns
The id of this feature.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getRange()

virtual SeqRange bpp::SequenceFeature::getRange ( ) const
pure virtual
Returns
Coordinates as a Range object.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::BasicSequenceFeature::overlap().

◆ getScore()

virtual const double& bpp::SequenceFeature::getScore ( ) const
pure virtual
Returns
The score associated to the feature (eg, an E-value or a P-value).

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getSequenceId()

virtual const std::string& bpp::SequenceFeature::getSequenceId ( ) const
pure virtual
Returns
The id of the sequence on which this feature is based.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::BasicSequenceFeature::overlap(), and bpp::GffFeatureReader::toString().

◆ getSource()

virtual const std::string& bpp::SequenceFeature::getSource ( ) const
pure virtual
Returns
A text intended to describe the algorithm or procedure used to generate the feature.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getStart()

virtual const size_t bpp::SequenceFeature::getStart ( ) const
pure virtual
Returns
The starting position of the feature, 0-based, included.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ getType()

virtual const std::string& bpp::SequenceFeature::getType ( ) const
pure virtual
Returns
A text describing the type of feature. Depending on the format, it can be restricted (for example, mRNA), or any text can be supplied (for example TFXX binding site).

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ invert()

virtual void bpp::SequenceFeature::invert ( )
pure virtual

Change the orientation of the feature.

Implemented in bpp::BasicSequenceFeature.

◆ isNegativeStrand()

virtual bool bpp::SequenceFeature::isNegativeStrand ( ) const
pure virtual
Returns
True if the sequence is coded on the negative strand. False if it is on the positive one or unknown.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ isStranded()

virtual bool bpp::SequenceFeature::isStranded ( ) const
pure virtual
Returns
True if the feature is stranded.

Implemented in bpp::BasicSequenceFeature.

Referenced by bpp::GffFeatureReader::toString().

◆ overlap()

virtual bool bpp::SequenceFeature::overlap ( const SequenceFeature feat) const
pure virtual
Returns
True if the features overlap.

Implemented in bpp::BasicSequenceFeature.

◆ removeAttribute()

virtual void bpp::SequenceFeature::removeAttribute ( const std::string &  attribute)
pure virtual
Parameters
attributeThe name of the attribute to be removed.

Implemented in bpp::BasicSequenceFeature.

◆ setAttribute()

virtual void bpp::SequenceFeature::setAttribute ( const std::string &  attribute,
const std::string &  value 
)
pure virtual

Set the value of an attribute.

Parameters
attributeThe name of the attribute to set.
valueThe value of the attribute to set.

Implemented in bpp::BasicSequenceFeature.

◆ setId()

virtual void bpp::SequenceFeature::setId ( const std::string &  id)
pure virtual
Parameters
idA std::string representing the id.

Implemented in bpp::BasicSequenceFeature.

◆ setScore()

virtual void bpp::SequenceFeature::setScore ( double  score)
pure virtual
Parameters
scoreA double representing the score of this feature.

Implemented in bpp::BasicSequenceFeature.

◆ setSequenceId()

virtual void bpp::SequenceFeature::setSequenceId ( const std::string &  id)
pure virtual
Parameters
idA std::string representing the id of the reference.

Implemented in bpp::BasicSequenceFeature.

◆ setSource()

virtual void bpp::SequenceFeature::setSource ( const std::string &  source)
pure virtual
Parameters
sourceA std::string representing the source of the feature.

Implemented in bpp::BasicSequenceFeature.

◆ setType()

virtual void bpp::SequenceFeature::setType ( const std::string &  type)
pure virtual
Parameters
typeA std::string representing the type of this feature.

Implemented in bpp::BasicSequenceFeature.

Member Data Documentation

◆ NO_ATTRIBUTE_SET

const std::string SequenceFeature::NO_ATTRIBUTE_SET = ""
static

Definition at line 130 of file SequenceFeature.h.

Referenced by bpp::BasicSequenceFeature::getAttribute().


The documentation for this class was generated from the following files: