bpp-seq3
3.0.0
|
The VectorSequenceContainer class. More...
#include <Bpp/Seq/Container/VectorSequenceContainer.h>
Public Member Functions | |
TemplateVectorSequenceContainer (std::shared_ptr< const Alphabet > alphabet, std::vector< std::unique_ptr< SequenceType >> &vs) | |
Build a container with pointers to sequence objects. More... | |
TemplateVectorSequenceContainer (std::shared_ptr< const Alphabet > alphabet) | |
Build an empty container that will contain sequences of a particular alphabet. More... | |
TemplateVectorSequenceContainer & | operator= (const TemplateVectorSequenceContainer &vsc) |
Assign from a VectorSequenceContainer. More... | |
TemplateVectorSequenceContainer & | operator= (const TemplateSequenceContainerInterface< SequenceType, std::string > &sc) |
Copy from a SequenceContainer. More... | |
virtual | ~TemplateVectorSequenceContainer () |
void | clear () override |
Delete all data in the container. More... | |
virtual void | addSequence (std::unique_ptr< SequenceType > &sequencePtr) |
Add a sequence to the container, using its name as a key. More... | |
const Alphabet & | alphabet () const override |
Get the container's alphabet. More... | |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
Get a pointer toward the container's alphabet. More... | |
virtual const Comments & | getComments () const =0 |
Get the comments. More... | |
const Comments & | getComments () const override |
Get the comments. More... | |
virtual void | setComments (const Comments &comments)=0 |
Set the comments. More... | |
void | setComments (const Comments &comments) override |
Set the comments. More... | |
virtual void | clearComments ()=0 |
void | clearComments () override |
Copy constructors: | |
TemplateVectorSequenceContainer (const TemplateVectorSequenceContainer< SequenceType > &vsc) | |
Copy from a VectorSequenceContainer. More... | |
TemplateVectorSequenceContainer (const TemplateSequenceContainerInterface< SequenceType, std::string > &sc) | |
Copy from a SequenceContainer. More... | |
The Clonable interface. | |
TemplateVectorSequenceContainer< SequenceType > * | clone () const override |
The SequenceContainer interface. | |
TemplateVectorSequenceContainer< SequenceType > * | createEmptyContainer () const override |
Return a copy of this container, but with no data inside. More... | |
double | getStateValueAt (size_t sitePosition, const std::string &sequenceKey, int state) const override |
Get the value of a state at a given position. More... | |
double | operator() (size_t sitePosition, const std::string &sequenceKey, int state) const override |
Get the value of a state at a given position. More... | |
double | getStateValueAt (size_t sitePosition, size_t sequencePosition, int state) const override |
Get value of a state at a given position. More... | |
double | operator() (size_t sitePosition, size_t sequencePosition, int state) const override |
Get the value of a state at a given position. More... | |
size_t | getNumberOfSequences () const override |
Get the number of sequences in the container. More... | |
std::vector< std::string > | getSequenceKeys () const override |
void | setSequenceKeys (const std::vector< std::string > &sequenceKeys) override |
Reset all sequence keys. More... | |
const std::string & | sequenceKey (size_t sequencePosition) const override |
Get the key associated to a given sequence. More... | |
size_t | getSequencePosition (const std::string &sequenceKey) const override |
Get the position of a sequence with a given key in the container. More... | |
const SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t elementPosition) const override |
Get the content of the dataset at a specific position (sequence key, site position). More... | |
SequenceType::ElementType & | valueAt (const std::string &sequenceKey, size_t elementPosition) override |
Get the content of the dataset at a specific position (sequence key, site position). More... | |
const SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t elementPosition) const override |
Get the content of the dataset at a specific position (sequence position, site position). More... | |
SequenceType::ElementType & | valueAt (size_t sequencePosition, size_t elementPosition) override |
Get the content of the dataset at a specific position (sequence position, site position). More... | |
bool | hasSequence (const std::string &sequenceKey) const override |
Check if a certain key is associated to a sequence in the container. More... | |
const SequenceType & | sequence (const std::string &sequenceKey) const override |
Retrieve a sequence object from the container. More... | |
void | setSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr) override |
Replace a sequence in the container. More... | |
void | addSequence (const std::string &sequenceKey, std::unique_ptr< SequenceType > &sequencePtr) override |
Add a sequence to the container. More... | |
std::unique_ptr< SequenceType > | removeSequence (const std::string &sequenceKey) override |
Remove a sequence from the container. More... | |
void | deleteSequence (const std::string &sequenceKey) override |
Remove and delete a sequence from the container. More... | |
void | deleteSequence (size_t sequencePosition) override |
Remove and delete a sequence from the container. More... | |
const SequenceType & | sequence (size_t sequencePosition) const override |
Retrieve a sequence object from the container. More... | |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr) override |
Replace a sequence in the container. More... | |
void | setSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const std::string &sequenceKey) override |
Replace a sequence in the container. More... | |
void | insertSequence (size_t sequencePosition, std::unique_ptr< SequenceType > &sequencePtr, const std::string &sequenceKey) override |
Insert a sequence in the container. More... | |
std::unique_ptr< SequenceType > | removeSequence (size_t sequencePosition) override |
Remove a sequence from the container. More... | |
std::vector< std::string > | getSequenceNames () const override |
void | setSequenceNames (const std::vector< std::string > &names, bool updateKeys) override |
Batch-set all sequence names. More... | |
std::vector< Comments > | getSequenceComments () const override |
Protected Member Functions | |
virtual SequenceType & | sequence_ (size_t sequencePosition) |
virtual SequenceType & | sequence_ (const std::string &sequenceKey) |
getSequence with given key More... | |
Protected Attributes | |
VectorMappedContainer< SequenceType > | sequenceVectorMap_ |
std::shared_ptr< const Alphabet > | alphabet_ |
The container's alphabet. More... | |
Comments | comments_ |
The VectorSequenceContainer class.
This is the simplest implementation of the SequenceContainer interface. std::shared_ptr<Sequence> are stored in a std::vector, as well as in a std::map.
Definition at line 30 of file VectorSequenceContainer.h.
|
inline |
Build a container with pointers to sequence objects.
The keys of the map are set to the names of the sequences.
alphabet | The alphabet of the container. |
vs | A vector of smart pointers toward sequence objects. |
Definition at line 45 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence().
|
inline |
Build an empty container that will contain sequences of a particular alphabet.
alphabet | The alphabet of the container. |
Definition at line 62 of file VectorSequenceContainer.h.
|
inline |
Copy from a VectorSequenceContainer.
vsc | The VectorSequenceContainer to copy into this container. |
Definition at line 78 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
|
inline |
Copy from a SequenceContainer.
sc | The SequenceContainer to copy into this container. |
Definition at line 97 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::Commentable::getComments(), bpp::TemplateSequenceDataInterface< HashType >::getNumberOfSequences(), bpp::TemplateSequenceContainerInterface< SequenceType, HashType >::sequence(), bpp::TemplateSequenceDataInterface< HashType >::sequenceKey(), and bpp::SimpleCommentable::setComments().
|
inlinevirtual |
Definition at line 150 of file VectorSequenceContainer.h.
|
inlineoverridevirtual |
Add a sequence to the container.
Similar to setSequence, with the exception that an Exception will be raised in case of an existing key. Existing sequences will not be updated, only new ones will be appended.
sequenceKey | The key to which the sequence is associated. |
sequencePtr | The sequence to add. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 264 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::appendObject(), bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >::getAlphabet(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), and bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer().
|
inlinevirtual |
Add a sequence to the container, using its name as a key.
sequencePtr | A unique_ptr to the sequence to add. |
Definition at line 371 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence().
|
inlineoverridevirtualinherited |
Get the container's alphabet.
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 95 of file AbstractSequenceContainer.h.
|
inlineoverridevirtual |
Delete all data in the container.
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 152 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::clear(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::clear(), and bpp::TemplateVectorSequenceContainer< SequenceType >::operator=().
|
inlineoverridevirtualinherited |
Implements bpp::Commentable.
Definition at line 88 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
|
pure virtualinherited |
Implemented in bpp::SimpleCommentable.
|
inlineoverridevirtual |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 163 of file VectorSequenceContainer.h.
|
inlineoverridevirtual |
Return a copy of this container, but with no data inside.
This method creates a new SequencedContainer object. The class of this container depends on the class implementing this interface.
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 176 of file VectorSequenceContainer.h.
References bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >::getAlphabet(), bpp::SimpleCommentable::getComments(), and bpp::SimpleCommentable::setComments().
|
inlineoverridevirtual |
Remove and delete a sequence from the container.
sequenceKey | The key to which the sequence is associated. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 280 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::deleteObject(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Remove and delete a sequence from the container.
sequencePosition | The position of the sequence. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 285 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::deleteObject(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtualinherited |
Get a pointer toward the container's alphabet.
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 101 of file AbstractSequenceContainer.h.
|
pure virtualinherited |
Get the comments.
Implemented in bpp::SimpleCommentable.
Referenced by bpp::Mase::appendSequencesFromStream(), bpp::AllelicAlphabet::convertFromStateAlphabet(), bpp::SiteContainerTools::getSelectedPositions(), bpp::MaseTools::getSelectedSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::AbstractCoreSequence::operator=(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceTools::subseq(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::TemplateAlignedSequenceContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::Stockholm::writeAlignment(), bpp::Fasta::writeSequences(), and bpp::Mase::writeSequences().
|
inlineoverridevirtualinherited |
Get the comments.
Implements bpp::Commentable.
Definition at line 79 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
Referenced by bpp::SequenceWithQualityTools::concatenate(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::createEmptyContainer(), bpp::TemplateVectorSiteContainer< SiteType, SequenceType >::createEmptyContainer(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::SequenceWithAnnotation::operator=(), bpp::SequenceWithQualityTools::subseq(), bpp::Pasta::writeSequence(), and bpp::Fasta::writeSequence().
|
inlineoverridevirtual |
Get the number of sequences in the container.
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 204 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::getSize(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::addSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::deleteSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::deleteSites(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequenceComments(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequenceNames(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::insertSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::removeSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::setSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::setSequenceNames(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::setSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::site(), and bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer().
|
inlineoverridevirtual |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 352 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequence().
|
inlineoverridevirtual |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 209 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::getObjectNames(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 327 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequence().
|
inlineoverridevirtual |
Get the position of a sequence with a given key in the container.
sequenceKey | The key to which the sequence is associated. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 224 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::getObjectPosition(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateVectorSequenceContainer< SequenceType >::setSequence().
|
inlineoverridevirtual |
Get the value of a state at a given position.
sitePosition | index of the site |
sequenceKey | key of the sequence in the container |
state | state in the alphabet |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 184 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
|
inlineoverridevirtual |
Get value of a state at a given position.
sitePosition | index of the site |
sequencePosition | index of the sequence in the container |
state | state in the alphabet |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 194 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence().
|
inlineoverridevirtual |
Check if a certain key is associated to a sequence in the container.
sequenceKey | The key to which the sequence is associated. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 249 of file VectorSequenceContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Insert a sequence in the container.
sequencePosition | The position of the sequence. |
sequencePtr | The sequence to add. |
sequenceKey | The new key of the sequence. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 311 of file VectorSequenceContainer.h.
References bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >::getAlphabet(), bpp::VectorMappedContainer< T >::insertObject(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::insertSequence().
|
inlineoverridevirtual |
Get the value of a state at a given position.
Same as getValueAt.
sitePosition | index of the site |
sequenceKey | key of the sequence in the container |
state | state in the alphabet |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 189 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
|
inlineoverridevirtual |
Get the value of a state at a given position.
Same as getValueAt.
sitePosition | index of the site |
sequencePosition | index of the sequence in the container |
state | state in the alphabet |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 199 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence().
|
inline |
Copy from a SequenceContainer.
sc | The SequenceContainer to copy into this container. |
Definition at line 136 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::clear(), bpp::Commentable::getComments(), bpp::TemplateSequenceDataInterface< HashType >::getNumberOfSequences(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateSequenceContainerInterface< SequenceType, HashType >::sequence(), bpp::TemplateSequenceDataInterface< HashType >::sequenceKey(), and bpp::SimpleCommentable::setComments().
|
inline |
Assign from a VectorSequenceContainer.
vsc | The VectorSequenceContainer to copy into this container. |
Definition at line 118 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::clear(), bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::operator=().
|
inlineoverridevirtual |
Remove a sequence from the container.
sequenceKey | The key to which the sequence is associated. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 273 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::removeObject(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Remove a sequence from the container.
sequencePosition | The position of the sequence. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 319 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::removeObject(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Retrieve a sequence object from the container.
sequenceKey | The key to which the sequence is associated. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 254 of file VectorSequenceContainer.h.
References bpp::MappedNamedContainer< T >::getObject(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateVectorSequenceContainer< SequenceType >::getSequenceComments(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequenceNames(), bpp::TemplateVectorSequenceContainer< SequenceType >::getStateValueAt(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator()(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::site(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::TemplateAlignedSequenceContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer(), and bpp::TemplateVectorSequenceContainer< SequenceType >::valueAt().
|
inlineoverridevirtual |
Retrieve a sequence object from the container.
sequencePosition | The position of the sequence. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 290 of file VectorSequenceContainer.h.
References bpp::MappedNamedContainer< T >::getObject(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineprotectedvirtual |
getSequence with given key
Definition at line 387 of file VectorSequenceContainer.h.
References bpp::MappedNamedContainer< T >::object(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineprotectedvirtual |
Definition at line 377 of file VectorSequenceContainer.h.
References bpp::MappedNamedContainer< T >::object(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::addSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::deleteSite(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::deleteSites(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::removeSite(), bpp::TemplateVectorSequenceContainer< SequenceType >::setSequenceNames(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::setSite(), bpp::TemplateVectorSequenceContainer< SequenceType >::valueAt(), and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::valueAt().
|
inlineoverridevirtual |
Get the key associated to a given sequence.
sequencePosition | The position of the sequence in the container. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 219 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::getObjectName(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::deleteSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequencePosition(), bpp::TemplateVectorSequenceContainer< SequenceType >::getStateValueAt(), bpp::TemplateVectorSequenceContainer< SequenceType >::hasSequence(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::insertSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::insertSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator()(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::removeSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence_(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::setSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::setSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::valueAt(), and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::valueAt().
|
inlineoverridevirtualinherited |
Set the comments.
comments | The new comments. |
Implements bpp::Commentable.
Definition at line 86 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
Referenced by bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::createEmptyContainer(), bpp::Pasta::nextSequence(), bpp::Fasta::nextSequence(), bpp::AbstractCoreSequence::operator=(), bpp::SequenceWithAnnotation::operator=(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::TemplateAlignedSequenceContainer(), and bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer().
|
pure virtualinherited |
Set the comments.
comments | The new comments. |
Implemented in bpp::SimpleCommentable.
Referenced by bpp::Pasta::appendAlignmentFromStream(), bpp::Clustal::appendAlignmentFromStream(), bpp::Fasta::appendSequencesFromStream(), and bpp::Mase::appendSequencesFromStream().
|
inlineoverridevirtual |
Replace a sequence in the container.
If a sequence is found with the given key, it will be updated with the new one. If no sequence with the given key is found, the new sequence will be added to the container.
sequenceKey | The key to which the sequence is associated. |
sequencePtr | The sequence to set. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 259 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::getSequencePosition(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::setSequence().
|
inlineoverridevirtual |
Replace a sequence in the container.
The original key associated to the sequence will be kept.
sequencePosition | The position of the sequence. |
sequencePtr | The sequence to add. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 295 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::addObject(), bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >::getAlphabet(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Replace a sequence in the container.
The original key associated to the sequence will be kept.
sequencePosition | The position of the sequence. |
sequencePtr | The sequence to add. |
sequenceKey | The new key of the sequence. |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 303 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< T >::addObject(), bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >::getAlphabet(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_.
|
inlineoverridevirtual |
Reset all sequence keys.
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 214 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_, and bpp::VectorMappedContainer< T >::setObjectNames().
|
inlineoverridevirtual |
Batch-set all sequence names.
names | A vector of sequence names. Must be the same size as the number of sequences in the container, otherwise a DimensionException is thrown. |
updateKeys | Tell whether the keys of the sequences should be updated with the new sequence names. |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Definition at line 338 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence_(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceVectorMap_, and bpp::VectorMappedContainer< T >::setObjectNames().
|
inlineoverridevirtual |
Get the content of the dataset at a specific position (sequence key, site position).
sequenceKey | key of the sequence in the container |
sitePosition | index of the site |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 229 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
|
inlineoverridevirtual |
Get the content of the dataset at a specific position (sequence key, site position).
sequenceKey | key of the sequence in the container |
sitePosition | index of the site |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 234 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence_(), and bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey().
|
inlineoverridevirtual |
Get the content of the dataset at a specific position (sequence position, site position).
sequencePosition | index of the sequence in the container |
sitePosition | index of the site |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 239 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence().
|
inlineoverridevirtual |
Get the content of the dataset at a specific position (sequence position, site position).
sequencePosition | index of the sequence in the container |
sitePosition | index of the site |
Implements bpp::TemplateSequenceContainerInterface< SequenceType, std::string >.
Definition at line 244 of file VectorSequenceContainer.h.
References bpp::TemplateVectorSequenceContainer< SequenceType >::sequence_().
|
protectedinherited |
The container's alphabet.
Definition at line 31 of file AbstractSequenceContainer.h.
|
protectedinherited |
Definition at line 50 of file Commentable.h.
Referenced by bpp::SimpleCommentable::clearComments(), bpp::SimpleCommentable::getComments(), bpp::SimpleCommentable::operator=(), and bpp::SimpleCommentable::setComments().
|
protected |
Definition at line 34 of file VectorSequenceContainer.h.
Referenced by bpp::TemplateVectorSequenceContainer< SequenceType >::addSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::clear(), bpp::TemplateVectorSequenceContainer< SequenceType >::deleteSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::getNumberOfSequences(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequenceKeys(), bpp::TemplateVectorSequenceContainer< SequenceType >::getSequencePosition(), bpp::TemplateVectorSequenceContainer< SequenceType >::hasSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::insertSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::removeSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequence_(), bpp::TemplateVectorSequenceContainer< SequenceType >::sequenceKey(), bpp::TemplateVectorSequenceContainer< SequenceType >::setSequence(), bpp::TemplateVectorSequenceContainer< SequenceType >::setSequenceKeys(), and bpp::TemplateVectorSequenceContainer< SequenceType >::setSequenceNames().