bpp-seq-omics
2.4.1
|
A simple ensemble of sequence features. More...
#include <Bpp/Seq/Feature/SequenceFeature.h>
Public Member Functions | |
SequenceFeatureSet () | |
virtual | ~SequenceFeatureSet () |
SequenceFeatureSet (const SequenceFeatureSet &sfs) | |
SequenceFeatureSet & | operator= (const SequenceFeatureSet &sfs) |
void | clear () |
Delete all features in this set. More... | |
const SequenceFeature & | getFeature (size_t i) const |
const SequenceFeature & | operator[] (size_t i) const |
size_t | getNumberOfFeatures () const |
bool | isEmpty () const |
void | addFeature (const SequenceFeature &feature) |
Add a feature to the container. The feature will be copied and the copy owned by the container. More... | |
std::set< std::string > | getSequences () const |
std::set< std::string > | getTypes () const |
void | fillRangeCollection (RangeCollection< size_t > &coords) const |
Get all coordinates of features. All ranges are added to a RangeCollection container, as SeqRange objects. More... | |
void | fillRangeCollectionForSequence (const std::string &seqId, RangeCollection< size_t > &coords) const |
Get all coordinates of features for a given source. All ranges are added to a RangeCollection container, as SeqRange objects. More... | |
SequenceFeatureSet * | getSubsetForType (const std::string &type) const |
SequenceFeatureSet * | getSubsetForTypes (const std::vector< std::string > &types) const |
SequenceFeatureSet * | getSubsetForSequence (const std::string &id) const |
SequenceFeatureSet * | getSubsetForSequences (const std::vector< std::string > &ids) const |
SequenceFeatureSet * | getSubsetForRange (const SeqRange &range, bool complete) const |
Private Attributes | |
std::vector< SequenceFeature * > | features_ |
A simple ensemble of sequence features.
This class is at a draft stage, and further improvements are expected, notably to allow proper indexation, nested features, etc.
For now, it is mostly a vector of feature object, stored as pointers. A few functions are provided for convenience.
Definition at line 417 of file SequenceFeature.h.
|
inline |
Definition at line 423 of file SequenceFeature.h.
Referenced by getSubsetForRange(), getSubsetForSequence(), getSubsetForSequences(), getSubsetForType(), and getSubsetForTypes().
|
inlinevirtual |
Definition at line 425 of file SequenceFeature.h.
References clear().
|
inline |
Definition at line 427 of file SequenceFeature.h.
References features_.
|
inline |
Add a feature to the container. The feature will be copied and the copy owned by the container.
feature | The feature to add to the container. |
Definition at line 493 of file SequenceFeature.h.
References bpp::SequenceFeature::clone(), and features_.
Referenced by bpp::BedGraphFeatureReader::getAllFeatures(), bpp::GffFeatureReader::getAllFeatures(), bpp::GtfFeatureReader::getAllFeatures(), bpp::BedGraphFeatureReader::getFeaturesOfSequence(), bpp::GffFeatureReader::getFeaturesOfSequence(), bpp::GtfFeatureReader::getFeaturesOfSequence(), bpp::BedGraphFeatureReader::getFeaturesOfType(), bpp::GffFeatureReader::getFeaturesOfType(), bpp::GtfFeatureReader::getFeaturesOfType(), bpp::SequenceFeatureTools::getOrfs(), getSubsetForRange(), getSubsetForSequence(), getSubsetForSequences(), getSubsetForType(), and getSubsetForTypes().
|
inline |
Delete all features in this set.
Definition at line 451 of file SequenceFeature.h.
References features_.
Referenced by operator=(), and ~SequenceFeatureSet().
|
inline |
Get all coordinates of features. All ranges are added to a RangeCollection container, as SeqRange objects.
coords | [out] a container where to add the coordinates of each feature. |
Definition at line 528 of file SequenceFeature.h.
References bpp::RangeCollection< class >::addRange(), and features_.
|
inline |
Get all coordinates of features for a given source. All ranges are added to a RangeCollection container, as SeqRange objects.
seqId | The name of the sequence id to consider. |
coords | [out] a container where to add the coordinates of each feature. |
Definition at line 542 of file SequenceFeature.h.
References bpp::RangeCollection< class >::addRange(), and features_.
Referenced by bpp::FeatureExtractorMafIterator::FeatureExtractorMafIterator(), and bpp::FeatureFilterMafIterator::FeatureFilterMafIterator().
|
inline |
i | The index of the feature. |
Definition at line 465 of file SequenceFeature.h.
References features_.
|
inline |
Definition at line 481 of file SequenceFeature.h.
References features_.
Referenced by bpp::BedGraphFeatureReader::toString(), and bpp::GffFeatureReader::toString().
|
inline |
Definition at line 500 of file SequenceFeature.h.
References features_.
Referenced by bpp::CoordinateTranslatorMafIterator::CoordinateTranslatorMafIterator(), bpp::FeatureExtractorMafIterator::FeatureExtractorMafIterator(), and bpp::FeatureFilterMafIterator::FeatureFilterMafIterator().
|
inline |
range | The range of features to look for. |
complete | If true, only return features fully included in the given range. Otherwise returns features overlapping with the range. |
Definition at line 622 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
|
inline |
id | The sequence id to look for. |
Definition at line 588 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
Referenced by bpp::CoordinateTranslatorMafIterator::CoordinateTranslatorMafIterator().
|
inline |
ids | The sequence ids to look for. |
Definition at line 604 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
|
inline |
type | The feature type. |
Definition at line 556 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
|
inline |
types | The feature types. |
Definition at line 572 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
|
inline |
Definition at line 513 of file SequenceFeature.h.
References features_.
|
inline |
Definition at line 486 of file SequenceFeature.h.
References features_.
|
inline |
Definition at line 436 of file SequenceFeature.h.
|
inline |
i | The index of the feature. |
Definition at line 474 of file SequenceFeature.h.
References features_.
|
private |
Definition at line 420 of file SequenceFeature.h.
Referenced by addFeature(), clear(), fillRangeCollection(), fillRangeCollectionForSequence(), getFeature(), getNumberOfFeatures(), getSequences(), getSubsetForRange(), getSubsetForSequence(), getSubsetForSequences(), getSubsetForType(), getSubsetForTypes(), getTypes(), isEmpty(), operator=(), operator[](), and SequenceFeatureSet().