bpp-seq-omics
2.2.0
|
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 |
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 | 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::vector< std::string > &types) 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 361 of file SequenceFeature.h.
|
inline |
Definition at line 367 of file SequenceFeature.h.
Referenced by getSubsetForType().
|
inlinevirtual |
Definition at line 369 of file SequenceFeature.h.
References clear().
|
inline |
Definition at line 371 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 432 of file SequenceFeature.h.
References bpp::SequenceFeature::clone(), and features_.
Referenced by bpp::GtfFeatureReader::getFeaturesOfSequence(), bpp::GffFeatureReader::getFeaturesOfSequence(), bpp::GtfFeatureReader::getFeaturesOfType(), bpp::GffFeatureReader::getFeaturesOfType(), bpp::SequenceFeatureTools::getOrfs(), and getSubsetForType().
|
inline |
Delete all features in this set.
Definition at line 395 of file SequenceFeature.h.
References features_.
Referenced by operator=(), and ~SequenceFeatureSet().
|
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 468 of file SequenceFeature.h.
References features_.
Referenced by bpp::FeatureExtractor::FeatureExtractor(), and bpp::FeatureFilterMafIterator::FeatureFilterMafIterator().
|
inline |
i | The index of the feature. |
Definition at line 409 of file SequenceFeature.h.
References features_.
|
inline |
Definition at line 425 of file SequenceFeature.h.
References features_.
Referenced by bpp::GffFeatureReader::toString().
|
inline |
Definition at line 439 of file SequenceFeature.h.
References features_.
Referenced by bpp::FeatureExtractor::FeatureExtractor(), and bpp::FeatureFilterMafIterator::FeatureFilterMafIterator().
|
inline |
types | The feature type. |
Definition at line 482 of file SequenceFeature.h.
References addFeature(), features_, and SequenceFeatureSet().
|
inline |
Definition at line 452 of file SequenceFeature.h.
References features_.
|
inline |
Definition at line 380 of file SequenceFeature.h.
|
inline |
i | The index of the feature. |
Definition at line 418 of file SequenceFeature.h.
References features_.
|
private |
Definition at line 364 of file SequenceFeature.h.
Referenced by addFeature(), clear(), fillRangeCollectionForSequence(), getFeature(), getNumberOfFeatures(), getSequences(), getSubsetForType(), getTypes(), operator=(), operator[](), and SequenceFeatureSet().