bpp-seq3
3.0.0
|
The VectorProbabilisticSiteContainer class. More...
#include <Bpp/Seq/Container/VectorProbabilisticSiteContainer.h>
Public Member Functions | |
VectorProbabilisticSiteContainer (const Alphabet *alpha) | |
Build a new emtpy container. More... | |
VectorProbabilisticSiteContainer (const std::vector< const CruxSymbolListSite * > &vs, const Alphabet *alpha, bool checkPositions=true) | |
Build a new container from a set of sites. More... | |
VectorProbabilisticSiteContainer (const AlignedValuesContainer &avc) | |
Build a new container from an AlignedValuesContainer. More... | |
VectorProbabilisticSiteContainer (const std::vector< std::string > &names, const Alphabet *alpha) | |
Build a new empty container with specified sequence names. More... | |
virtual | ~VectorProbabilisticSiteContainer () |
size_t | getNumberOfSequences () const |
Get the number of sequences in the container. More... | |
const std::shared_ptr< ProbabilisticSite > | getSite (size_t i) const |
Get a site from the container. More... | |
std::shared_ptr< ProbabilisticSite > | getSite (size_t i) |
const ProbabilisticSequence & | getSequence (std::size_t i) const |
Get Sequence from a position in the container. More... | |
const ProbabilisticSequence & | getSequence (const std::string &name) const |
Get Sequence from its name in the container. More... | |
bool | hasSequence (const std::string &name) const |
Check if a sequence with a given name is present in the container. More... | |
size_t | getSequencePosition (const std::string &name) const |
Get the position of a sequence in sequence container from its name. More... | |
std::vector< std::string > | getSequenceNames () const |
Get all the names of the sequences in the container. More... | |
void | setSequenceNames (const std::vector< std::string > &names, bool checkNames=true) |
Set all sequence names. More... | |
void | setComments (size_t sequenceIndex, const Comments &comments) |
std::string | toString (const std::string &name) const |
Output to string. More... | |
virtual std::string | toString (const std::string &name) const=0 |
Convert a particular sequence to a string. More... | |
const Comments & | getComments (const std::string &name) const |
Get comments of a particular sequence. More... | |
virtual const Comments & | getComments (const std::string &name) const=0 |
Get comments of a particular sequence. More... | |
const Comments & | getComments () const |
Get the comments. More... | |
void | setComments (const std::string &name, const Comments &comments) |
Set the comments of a particular sequence. More... | |
virtual void | setComments (const std::string &name, const Comments &comments)=0 |
Set the comments of a particular sequence. More... | |
void | setComments (const Comments &comments) |
Set the comments. More... | |
virtual double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const=0 |
get value of a state in a position More... | |
void | clearComments () |
const CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) const |
Get a CruxSymbolListSite from a given position. More... | |
CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) |
size_t | getSize () const |
the size More... | |
bool | isAvailablePosition (size_t objectIndex) const |
void | setSize (size_t size) |
void | nullify () |
Nullify all elements. More... | |
size_t | getSize () const |
Get the number of objects in the container. More... | |
void | setSize (size_t size) |
void | changeName (const std::string &okey, const std::string &nkey) |
change the key of an object. More... | |
bool | isAvailableName (std::string objectName) const |
Return if the name is in the map keys and the mapped object is nullptr or empty. More... | |
bool | isAvailablePosition (size_t objectIndex) const |
void | nullify () |
Nullify all elements. More... | |
The Clonable interface. | |
VectorProbabilisticSiteContainer (const VectorProbabilisticSiteContainer &vpsc) | |
Copy contructors. More... | |
VectorProbabilisticSiteContainer (const OrderedSequenceContainer &osc) | |
VectorProbabilisticSiteContainer & | operator= (const VectorProbabilisticSiteContainer &vpsc) |
VectorProbabilisticSiteContainer * | clone () const |
SequencedValuesContainer methods. | |
double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const |
get value of a state in a position More... | |
double | operator() (size_t siteIndex, const std::string &sequenceName, int state) const |
From the OrderedSequenceContainer interface | |
virtual std::string | toString (size_t sequenceIndex) const |
virtual const Comments & | getComments (size_t sequenceIndex) const |
virtual const std::string & | getName (size_t sequenceIndex) const |
Get the name of a particular row of the alignement (aka sequence). More... | |
const Comments & | getGeneralComments () const |
Get the comments of this container. More... | |
void | setGeneralComments (const Comments &comments) |
Set the comments of this container. More... | |
void | deleteGeneralComments () |
Delete the comments associated to this container. More... | |
From the SequencedValuesContainer interface | |
const Alphabet * | getAlphabet () const |
Get container's alphabet. More... | |
Protected Member Functions | |
const std::shared_ptr< ProbabilisticSite > | getObject (size_t objectIndex) const |
Retrieve an object from the container. Set as protected since they will be public under T specific names. More... | |
std::shared_ptr< ProbabilisticSite > | getObject (size_t objectIndex) |
void | addObject (std::shared_ptr< ProbabilisticSite > object, size_t objectIndex, bool checkPosition=false) |
Add an object. More... | |
void | insertObject (std::shared_ptr< ProbabilisticSite > object, size_t objectIndex) |
Insert an object. More... | |
std::shared_ptr< ProbabilisticSite > | removeObject (size_t objectIndex) |
Extract and remove a object from the container. More... | |
void | deleteObject (size_t objectIndex) |
Delete an object from the container. More... | |
void | deleteObjects (size_t objectIndex, size_t length) |
void | appendObject (std::shared_ptr< ProbabilisticSite > object) |
std::shared_ptr< ProbabilisticSite > | getObject_ (size_t objectIndex) const |
void | addObject_ (std::shared_ptr< ProbabilisticSite > object, size_t objectIndex, bool checkPosition=false) const |
size_t | getNumberOfObjects () const |
size_t | getObjectPosition (const std::string &name) const |
Link between position & name. More... | |
std::string | getObjectName (size_t objectIndex) const |
const std::shared_ptr< ProbabilisticSequence > | getObject (size_t objectIndex) const |
Retrieve an object from the container. Set as protected since they will be public under T specific names. More... | |
std::shared_ptr< ProbabilisticSequence > | getObject (size_t objectIndex) |
const std::shared_ptr< ProbabilisticSequence > | getObject (const std::string &name) const |
Get a object. More... | |
std::shared_ptr< ProbabilisticSequence > | getObject (const std::string &name) |
bool | hasObject (const std::string &name) const |
Check if a object with a given name is present in the container. More... | |
std::vector< std::string > | getObjectNames () const |
void | setObjectNames (const std::vector< std::string > &names) |
void | setObjectName (size_t pos, const std::string &name) |
void | addObject (std::shared_ptr< ProbabilisticSequence > object, size_t objectIndex, const std::string &name, bool check=false) |
virtual void | addObject (std::shared_ptr< T > object, size_t objectIndex, const std::string &name, bool check=false)=0 |
void | addObject (std::shared_ptr< T > object, const std::string &name, bool checkName=false) |
Set a object. More... | |
void | addObject (std::shared_ptr< T > object, size_t objectIndex, bool checkPosition=false) |
Add an object. More... | |
void | insertObject (std::shared_ptr< ProbabilisticSequence > object, size_t objectIndex, const std::string &name) |
virtual void | insertObject (std::shared_ptr< T > object, size_t objectIndex, const std::string &name)=0 |
void | insertObject (std::shared_ptr< T > object, size_t objectIndex) |
Insert an object. More... | |
void | appendObject (std::shared_ptr< ProbabilisticSequence > object, const std::string &name, bool check=true) |
void | appendObject (std::shared_ptr< T > object) |
std::shared_ptr< ProbabilisticSequence > | removeObject (size_t objectIndex) |
Extract and remove a object from the container. More... | |
std::shared_ptr< ProbabilisticSequence > | removeObject (const std::string &name) |
Remove and returns a object. More... | |
void | deleteObject (size_t objectIndex) |
Delete an object from the container. More... | |
void | deleteObject (const std::string &name) |
Remove a object. More... | |
void | addObject_ (std::shared_ptr< ProbabilisticSequence > object, size_t objectIndex, const std::string &name, bool check=false) const |
void | addObject_ (std::shared_ptr< T > object, const std::string &name, bool checkName=false) const |
void | addObject_ (std::shared_ptr< T > object, size_t objectIndex, bool checkPosition=false) const |
void | deleteObjects (size_t objectIndex, size_t length) |
std::shared_ptr< T > | getObject_ (size_t objectIndex) const |
Protected Attributes | |
const Alphabet * | alphabet_ |
The container's alphabet. More... | |
Comments | comments_ |
std::vector< std::shared_ptr< ProbabilisticSite > > | positions_ |
std::vector< std::shared_ptr< T > > | positions_ |
Private Attributes | |
std::vector< std::string > | vNames_ |
std::map< std::string, size_t > | mNames_ |
std::map< std::string, std::shared_ptr< T > > | mObjects_ |
OrderedValuesContainer methods. | |
double | getStateValueAt (size_t siteIndex, size_t sequenceIndex, int state) const |
double | operator() (size_t siteIndex, size_t sequenceIndex, int state) const |
void | addSite (std::shared_ptr< ProbabilisticSite > site, bool checkPosition=false) |
Add a site at the end of the container. More... | |
void | addSequence (const ProbabilisticSequence &sequence, bool checkName=true) |
Add a probabilistic sequence to the container. More... | |
void | addSequence (const Sequence &sequence, bool checkName=true) |
Add a basic sequence to the container, through conversion to a probabilistic sequence. More... | |
void | setSequence (const std::string &name, const ProbabilisticSequence &sequence, bool checkName) |
Replace a probabilistic sequence in the container. More... | |
void | setSequence (size_t sequenceIndex, const ProbabilisticSequence &sequence, bool checkName) |
void | clear () |
Delete all objects in the container. More... | |
VectorProbabilisticSiteContainer * | createEmptyContainer () const |
Return a copy of this container, but with no data inside. More... | |
void | deleteSites (size_t siteIndex, size_t length) |
Remove a continuous range of sites in the container. More... | |
size_t | getNumberOfSites () const |
Get the number of aligned positions in the container. More... | |
void | reindexSites () |
Set all positions attributes. More... | |
Vint | getSitePositions () const |
Get all position attributes of sites. More... | |
void | setSitePositions (Vint vPositions) |
Set all position attributes of sites. More... | |
void | realloc (size_t n) |
The VectorProbabilisticSiteContainer class.
ProbabilisticSites are stored in a std::vector of pointers. ProbabilisticSite access is hence in , and sequence access in , where is the number of sites in the container.
This is a modified copy of VectorSiteContainer with the minimum changes necessary for it to work with bppML and bppAncestor
Definition at line 72 of file VectorProbabilisticSiteContainer.h.
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const Alphabet * | alpha | ) |
Build a new emtpy container.
Definition at line 50 of file VectorProbabilisticSiteContainer.cpp.
Referenced by clone(), and createEmptyContainer().
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const std::vector< const CruxSymbolListSite * > & | vs, |
const Alphabet * | alpha, | ||
bool | checkPositions = true |
||
) |
Build a new container from a set of sites.
vs | A std::vector of sites. Those sites are cloned in the container. |
alpha | The common alphabet for all sites. |
checkPositions | Check for the redundancy of site position tag. This may turn to be very time consuming! |
Exception | If sites differ in size or in alphabet. |
Class constructors:
Definition at line 59 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), clone(), and bpp::TextTools::toString().
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const AlignedValuesContainer & | avc | ) |
Build a new container from an AlignedValuesContainer.
Definition at line 101 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AlignedValuesContainer::getNumberOfSites(), bpp::SequencedValuesContainer::getSequenceNames(), and bpp::AlignedValuesContainer::getSymbolListSite().
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const std::vector< std::string > & | names, |
const Alphabet * | alpha | ||
) |
Build a new empty container with specified sequence names.
names | Sequence names. This will set the number of sequences in the container. |
alpha | The alphabet for this container. |
Definition at line 88 of file VectorProbabilisticSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::appendObject().
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const VectorProbabilisticSiteContainer & | vpsc | ) |
Copy contructors.
Sites are cloned.
Definition at line 126 of file VectorProbabilisticSiteContainer.cpp.
VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 135 of file VectorProbabilisticSiteContainer.cpp.
References addSequence(), bpp::SequencedValuesContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), bpp::SequencedValuesContainer::getSequenceNames(), and setSequenceNames().
|
inlinevirtual |
Definition at line 143 of file VectorProbabilisticSiteContainer.h.
|
inlineprotectedinherited |
Definition at line 226 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Add an object.
object | The object to add. |
objectIndex | The new position of the object |
checkPosition | Look if the position is empty. |
Definition at line 192 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Set a object.
name | The key of the object. |
object | The new object that will be associated to the key. |
checkName | Tell is the object name must be checked. |
Definition at line 140 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), and bpp::MappedNamedContainer< T >::mObjects_.
Referenced by bpp::VectorMappedContainer< T >::addObject(), bpp::VectorMappedContainer< T >::appendObject(), and bpp::VectorMappedContainer< T >::insertObject().
|
inlineprotectedinherited |
Add an object.
object | The object to add. |
objectIndex | The new position of the object |
checkPosition | Look if the position is empty. |
Definition at line 192 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::VectorMappedContainer< T >::addObject(), bpp::AlignedSequenceContainer::getSite(), bpp::CompressedVectorSiteContainer::setSite(), and bpp::VectorSiteContainer::setSite().
|
protectedpure virtualinherited |
Implemented in bpp::VectorMappedContainer< T >.
|
inlineprotectedinherited |
Definition at line 298 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 258 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 234 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), and bpp::MappedNamedContainer< T >::mObjects_.
Referenced by bpp::VectorMappedContainer< T >::addObject_().
|
inlineprotectedinherited |
Definition at line 258 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::VectorMappedContainer< T >::addObject_(), and bpp::AlignedSequenceContainer::getSite().
|
virtual |
Add a probabilistic sequence to the container.
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Exception | Any other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation. |
Implements bpp::AbstractProbabilisticSequenceContainer.
Definition at line 204 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::CoreSequence::getComments(), bpp::ProbabilisticSequence::getContent(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), getSite(), bpp::VectorMappedContainer< ProbabilisticSequence >::hasObject(), bpp::AbstractProbabilisticSequenceContainer::setGeneralComments(), bpp::VectorPositionedContainer< T >::setSize(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
Referenced by bpp::Pasta::appendSequencesFromStream(), and VectorProbabilisticSiteContainer().
|
virtual |
Add a basic sequence to the container, through conversion to a probabilistic sequence.
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Exception | Any other kind of exception, if the name of the sequence is already used, are whatever else depending on the implementation. |
Implements bpp::AbstractProbabilisticSequenceContainer.
Definition at line 245 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::CoreSequence::getComments(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), getSite(), bpp::Alphabet::getSize(), bpp::CruxSymbolList::getStateValueAt(), bpp::VectorMappedContainer< ProbabilisticSequence >::hasObject(), bpp::AbstractProbabilisticSequenceContainer::setGeneralComments(), bpp::VectorPositionedContainer< T >::setSize(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
|
virtual |
Add a site at the end of the container.
site | The site to add. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Implements bpp::ProbabilisticSiteContainer.
Definition at line 168 of file VectorProbabilisticSiteContainer.cpp.
References bpp::VectorPositionedContainer< T >::appendObject(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSequences(), getNumberOfSites(), getSite(), bpp::VectorPositionedContainer< T >::nullify(), and bpp::TextTools::toString().
Referenced by addSequence(), bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSitesWithoutGaps(), operator=(), realloc(), bpp::SiteContainerTools::sampleSites(), and VectorProbabilisticSiteContainer().
|
inlineprotectedinherited |
Definition at line 250 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 246 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 246 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), addSite(), bpp::VectorMappedContainer< T >::appendObject(), and bpp::CompressedVectorSiteContainer::setSite().
|
inlineinherited |
change the key of an object.
okey | The present key of the object. |
nkey | The next key of the object. |
Definition at line 199 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), and bpp::MappedNamedContainer< T >::mObjects_.
Referenced by bpp::VectorMappedContainer< T >::setObjectName(), bpp::VectorMappedContainer< T >::setObjectNames(), setSequence(), and bpp::VectorSiteContainer::setSequence().
|
virtual |
Delete all objects in the container.
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 293 of file VectorProbabilisticSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::clear(), and bpp::VectorPositionedContainer< T >::clear().
Referenced by operator=(), and realloc().
|
inlineinherited |
Definition at line 102 of file Commentable.h.
References bpp::Commentable::comments_.
Referenced by bpp::BasicProbabilisticSequence::clearComments(), bpp::BasicSequence::clearComments(), bpp::SequenceWithAnnotation::clearComments(), bpp::SequenceWithQuality::clearComments(), bpp::AbstractProbabilisticSequenceContainer::deleteGeneralComments(), and bpp::AbstractValuesContainer::deleteGeneralComments().
|
inlinevirtual |
Implements bpp::ProbabilisticSiteContainer.
Definition at line 136 of file VectorProbabilisticSiteContainer.h.
References VectorProbabilisticSiteContainer().
Referenced by VectorProbabilisticSiteContainer().
|
virtual |
Return a copy of this container, but with no data inside.
This method creates a new SequencedValuesContainer objet. The class of this container depends on the derivative class.
Implements bpp::SequencedValuesContainer.
Definition at line 348 of file VectorProbabilisticSiteContainer.cpp.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::AbstractProbabilisticSequenceContainer::getGeneralComments(), bpp::AbstractProbabilisticSequenceContainer::setGeneralComments(), and VectorProbabilisticSiteContainer().
|
inlinevirtualinherited |
Delete the comments associated to this container.
Implements bpp::SequencedValuesContainer.
Definition at line 157 of file AbstractProbabilisticSequenceContainer.h.
References bpp::Commentable::clearComments().
|
inlineprotectedvirtualinherited |
Remove a object.
name | The key of the object. |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 293 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Delete an object from the container.
objectIndex | The index of the object in the container. |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 273 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Delete an object from the container.
objectIndex | The index of the object in the container. |
Implements bpp::PositionedContainer< T >.
Definition at line 230 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 238 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::AlignedSequenceContainer::deleteSites(), deleteSites(), and bpp::VectorSiteContainer::deleteSites().
|
inlineprotectedinherited |
Definition at line 238 of file VectorPositionedContainer.h.
|
inlinevirtual |
Remove a continuous range of sites in the container.
siteIndex | The position of the first site in the container. |
length | The length of the region to delete, starting at pposition siteIndex. |
IndexOutOfBoundsException | If the specified range is not valid. |
Implements bpp::AlignedValuesContainer.
Definition at line 305 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorPositionedContainer< T >::deleteObjects().
|
inlinevirtualinherited |
Get container's alphabet.
Implements bpp::SequencedValuesContainer.
Definition at line 99 of file AbstractValuesContainer.h.
References bpp::AbstractValuesContainer::alphabet_.
Referenced by bpp::VectorProbabilisticSequenceContainer::addSequence(), addSequence(), bpp::VectorSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), addSite(), bpp::Pasta::appendSequencesFromStream(), bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::getSequence(), bpp::VectorSiteContainer::getSequence(), getSequence(), bpp::AlignedSequenceContainer::getSite(), bpp::CompressedVectorSiteContainer::getStateValueAt(), getStateValueAt(), bpp::VectorSiteContainer::getStateValueAt(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::CompressedVectorSiteContainer::operator()(), operator()(), bpp::VectorSiteContainer::operator()(), bpp::VectorProbabilisticSequenceContainer::operator()(), bpp::VectorSequenceContainer::operator()(), realloc(), bpp::VectorSiteContainer::realloc(), bpp::CompressedVectorSiteContainer::removeSite(), bpp::CompressedVectorSiteContainer::setComments(), setSequence(), bpp::VectorProbabilisticSequenceContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::VectorSequenceContainer::setSequence(), bpp::AlignedSequenceContainer::setSite(), bpp::CompressedVectorSiteContainer::setSite(), and bpp::VectorSiteContainer::setSite().
|
inlineinherited |
Get the comments.
Definition at line 93 of file Commentable.h.
References bpp::Commentable::comments_.
Referenced by bpp::AbstractCoreSequence::getComments(), bpp::SequenceWithAnnotation::getComments(), bpp::SequenceWithQuality::getComments(), bpp::AbstractProbabilisticSequenceContainer::getGeneralComments(), bpp::AbstractValuesContainer::getGeneralComments(), and getSequence().
|
inlinevirtualinherited |
Get comments of a particular sequence.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::SequencedValuesContainer.
Definition at line 121 of file AbstractProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getComments(), and bpp::AbstractProbabilisticSequenceContainer::getSequence().
|
inherited |
Get comments of a particular sequence.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
|
inlinevirtualinherited |
Implements bpp::AbstractValuesContainer.
Definition at line 162 of file AbstractProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getComments(), and bpp::AbstractProbabilisticSequenceContainer::getSequence().
|
inlinevirtualinherited |
Get the comments of this container.
Implements bpp::SequencedValuesContainer.
Definition at line 147 of file AbstractProbabilisticSequenceContainer.h.
References bpp::Commentable::getComments().
Referenced by createEmptyContainer(), and bpp::SiteContainerTools::getSelectedSites().
|
inlinevirtualinherited |
Get the name of a particular row of the alignement (aka sequence).
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Implements bpp::OrderedValuesContainer.
Definition at line 137 of file AbstractProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getName(), and bpp::AbstractProbabilisticSequenceContainer::getSequence().
|
inlineprotectedinherited |
Definition at line 144 of file VectorMappedContainer.h.
|
inlinevirtual |
Get the number of sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 146 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::getSize().
Referenced by addSequence(), addSite(), getSequence(), getStateValueAt(), and setSequence().
|
inlinevirtual |
Get the number of aligned positions in the container.
Implements bpp::AlignedValuesContainer.
Definition at line 310 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorPositionedContainer< T >::getSize().
Referenced by addSequence(), addSite(), getSequence(), getSite(), getSitePositions(), getStateValueAt(), operator=(), reindexSites(), setSequence(), and setSitePositions().
|
inlineprotectedvirtualinherited |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 188 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Get a object.
name | The key of the object to retrieve. |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 183 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 172 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Implements bpp::PositionedContainer< T >.
Definition at line 177 of file VectorPositionedContainer.h.
|
inlineprotectedvirtualinherited |
Retrieve an object from the container. Set as protected since they will be public under T specific names.
objectIndex | The position of the object. |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 167 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Retrieve an object from the container. Set as protected since they will be public under T specific names.
objectIndex | The position of the object. |
Implements bpp::PositionedContainer< T >.
Definition at line 170 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 251 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
|
inlineprotectedinherited |
Definition at line 251 of file VectorPositionedContainer.h.
|
inlineprotectedvirtualinherited |
Implements bpp::PositionedNamedContainer< T >.
Definition at line 158 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 198 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Link between position & name.
Implements bpp::PositionedNamedContainer< T >.
Definition at line 149 of file VectorMappedContainer.h.
|
virtual |
Get Sequence from its name in the container.
name | Name of the sequence |
Implements bpp::AbstractProbabilisticSequenceContainer.
Definition at line 388 of file VectorProbabilisticSiteContainer.cpp.
References getSequence(), and getSequencePosition().
|
virtual |
Get Sequence from a position in the container.
i | index of the sequence |
Implements bpp::AbstractProbabilisticSequenceContainer.
Definition at line 357 of file VectorProbabilisticSiteContainer.cpp.
References bpp::Table< class >::addColumn(), bpp::VectorMappedContainer< T >::addObject_(), bpp::AbstractValuesContainer::getAlphabet(), bpp::Commentable::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::VectorMappedContainer< T >::getObject(), bpp::VectorMappedContainer< T >::getObjectName(), getSite(), bpp::VectorMappedContainer< ProbabilisticSequence >::getSize(), and bpp::MappedNamedContainer< T >::isAvailableName().
Referenced by bpp::SequenceApplicationTools::getAlignedContainer(), and getSequence().
|
inlinevirtual |
Get all the names of the sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 196 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::getObjectNames().
Referenced by bpp::SequenceApplicationTools::getAlignedContainer(), and operator=().
|
inlinevirtual |
Get the position of a sequence in sequence container from its name.
name | The name of the sequence. |
SequenceNotFoundException | If no sequence with name 'name' could be found. |
Implements bpp::OrderedValuesContainer.
Definition at line 190 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::getObjectPosition().
Referenced by getSequence(), getStateValueAt(), operator()(), and setSequence().
|
inlinevirtual |
Implements bpp::ProbabilisticSiteContainer.
Definition at line 161 of file VectorProbabilisticSiteContainer.h.
References getNumberOfSites(), and bpp::VectorPositionedContainer< T >::getObject().
|
inlinevirtual |
Get a site from the container.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::ProbabilisticSiteContainer.
Definition at line 153 of file VectorProbabilisticSiteContainer.h.
References getNumberOfSites(), and bpp::VectorPositionedContainer< T >::getObject().
Referenced by addSequence(), addSite(), bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSelectedSites(), getSequence(), getSitePositions(), bpp::SiteContainerTools::getSitesWithoutGaps(), getStateValueAt(), operator()(), operator=(), reindexSites(), bpp::SiteContainerTools::sampleSites(), setSequence(), and setSitePositions().
|
virtual |
Get all position attributes of sites.
Implements bpp::AlignedValuesContainer.
Definition at line 322 of file VectorProbabilisticSiteContainer.cpp.
References getNumberOfSites(), and getSite().
|
inlinevirtualinherited |
Get the number of objects in the container.
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 133 of file VectorMappedContainer.h.
|
inlinevirtualinherited |
the size
Implements bpp::PositionedContainer< T >.
Definition at line 129 of file VectorPositionedContainer.h.
|
inlinevirtual |
get value of a state in a position
siteIndex | index of the site |
sequenceName | name of the sequence in the container |
state | state in the alphabet |
Implements bpp::SequencedValuesContainer.
Definition at line 231 of file VectorProbabilisticSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSites(), getSequencePosition(), getSite(), and bpp::Alphabet::getStateIndex().
|
inherited |
get value of a state in a position
siteIndex | index of the site |
sequenceName | name of the sequence in the container |
state | state in the alphabet |
|
inlinevirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 259 of file VectorProbabilisticSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSequences(), getNumberOfSites(), getSite(), and bpp::Alphabet::getStateIndex().
|
inlinevirtualinherited |
Implements bpp::AlignedValuesContainer.
Definition at line 87 of file ProbabilisticSiteContainer.h.
References bpp::ProbabilisticSiteContainer::getSite().
|
inlinevirtualinherited |
Get a CruxSymbolListSite from a given position.
siteIndex | The position |
Implements bpp::AlignedValuesContainer.
Definition at line 82 of file ProbabilisticSiteContainer.h.
References bpp::ProbabilisticSiteContainer::getSite().
|
inlineprotectedvirtualinherited |
Check if a object with a given name is present in the container.
name | The name of the object. |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 193 of file VectorMappedContainer.h.
|
inlinevirtual |
Check if a sequence with a given name is present in the container.
name | The name of the sequence. |
Implements bpp::SequencedValuesContainer.
Definition at line 184 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::hasObject().
|
inlineprotectedinherited |
Definition at line 235 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Insert an object.
object | The object to add. |
objectIndex | The new position of the object |
Definition at line 209 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Insert an object.
object | The object to add. |
objectIndex | The new position of the object |
Definition at line 209 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), and bpp::VectorMappedContainer< T >::insertObject().
|
protectedpure virtualinherited |
Implemented in bpp::VectorMappedContainer< T >.
|
inlineinherited |
Return if the name is in the map keys and the mapped object is nullptr or empty.
Definition at line 228 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::getObject(), and bpp::MappedNamedContainer< T >::hasObject().
Referenced by bpp::CompressedVectorSiteContainer::getSequence(), bpp::VectorSiteContainer::getSequence(), and getSequence().
|
inlineinherited |
Definition at line 134 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
|
inlineinherited |
Definition at line 134 of file VectorPositionedContainer.h.
|
inlineinherited |
Nullify all elements.
Definition at line 163 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::AlignedSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSite(), addSite(), and bpp::AlignedSequenceContainer::setSequence().
|
inlineinherited |
Nullify all elements.
Definition at line 163 of file VectorPositionedContainer.h.
|
inlinevirtual |
Implements bpp::SequencedValuesContainer.
Definition at line 237 of file VectorProbabilisticSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getSequencePosition(), getSite(), and bpp::Alphabet::getStateIndex().
|
inlinevirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 266 of file VectorProbabilisticSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getSite(), and bpp::Alphabet::getStateIndex().
VectorProbabilisticSiteContainer & VectorProbabilisticSiteContainer::operator= | ( | const VectorProbabilisticSiteContainer & | vpsc | ) |
Definition at line 150 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), clear(), getNumberOfSites(), getSequenceNames(), getSite(), and bpp::AbstractProbabilisticSequenceContainer::operator=().
|
protected |
Definition at line 299 of file VectorProbabilisticSiteContainer.cpp.
References addSite(), clear(), bpp::AbstractValuesContainer::getAlphabet(), and reindexSites().
Referenced by setSequence().
|
virtual |
Set all positions attributes.
Implements bpp::AlignedValuesContainer.
Definition at line 312 of file VectorProbabilisticSiteContainer.cpp.
References getNumberOfSites(), and getSite().
Referenced by realloc().
|
inlineprotectedvirtualinherited |
Remove and returns a object.
name | The key of the object. |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 288 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Extract and remove a object from the container.
objectIndex | The position of the object. |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 259 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Extract and remove a object from the container.
objectIndex | The position of the object. |
Implements bpp::PositionedContainer< T >.
Definition at line 218 of file VectorPositionedContainer.h.
|
inlineinherited |
Set the comments.
comments | The new comments. |
Definition at line 100 of file Commentable.h.
References bpp::Commentable::comments_.
Referenced by bpp::AbstractCoreSequence::operator=(), bpp::AbstractCoreSequence::setComments(), bpp::SequenceWithAnnotation::setComments(), bpp::SequenceWithQuality::setComments(), bpp::AbstractProbabilisticSequenceContainer::setGeneralComments(), and bpp::AbstractValuesContainer::setGeneralComments().
|
inlinevirtualinherited |
Set the comments of a particular sequence.
name | The name of the sequence. |
comments | The comments to set to sequence with name 'name'. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::SequencedValuesContainer.
Definition at line 126 of file AbstractProbabilisticSequenceContainer.h.
References bpp::OrderedValuesContainer::getSequencePosition(), and bpp::OrderedValuesContainer::setComments().
|
inherited |
Set the comments of a particular sequence.
sequenceIndex | The position of the sequence. |
comments | The comments to set to sequence with position 'i'. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Referenced by bpp::AbstractProbabilisticSequenceContainer::setComments(), bpp::AbstractValuesContainer::setComments(), and bpp::VectorProbabilisticSequenceContainer::setComments().
|
inlinevirtual |
Implements bpp::AbstractProbabilisticSequenceContainer.
Definition at line 207 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::getObject().
|
inlinevirtualinherited |
Set the comments of this container.
comments | The comments to be associated to this container. |
Implements bpp::SequencedValuesContainer.
Definition at line 152 of file AbstractProbabilisticSequenceContainer.h.
References bpp::Commentable::setComments().
Referenced by addSequence(), bpp::Pasta::appendSequencesFromStream(), and createEmptyContainer().
|
inlineprotectedinherited |
Definition at line 219 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 203 of file VectorMappedContainer.h.
|
virtual |
Replace a probabilistic sequence in the container.
name | The name of the sequence in the map. |
sequence | The sequence to add. |
checkName | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Implements bpp::ProbabilisticSequenceContainer.
Definition at line 398 of file VectorProbabilisticSiteContainer.cpp.
References getSequencePosition().
void VectorProbabilisticSiteContainer::setSequence | ( | size_t | sequenceIndex, |
const ProbabilisticSequence & | sequence, | ||
bool | checkName | ||
) |
Definition at line 407 of file VectorProbabilisticSiteContainer.cpp.
References bpp::MappedNamedContainer< T >::changeName(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), bpp::VectorMappedContainer< T >::getObject(), bpp::VectorMappedContainer< ProbabilisticSequence >::getObjectName(), getSite(), bpp::CoreSymbolList< T >::getValue(), realloc(), and bpp::CruxSymbolList::size().
|
inlinevirtual |
Set all sequence names.
names | A vector of strings with all sequence names. Its size must be strictly equal to the the size of the container (the number of sequences). |
checkNames | Tell if the container must check if the name of the sequence is already used in the container before adding it. |
Exception | If there are redundant names in the input vector. |
Implements bpp::SequencedValuesContainer.
Definition at line 201 of file VectorProbabilisticSiteContainer.h.
References bpp::VectorMappedContainer< T >::setObjectNames().
Referenced by VectorProbabilisticSiteContainer().
|
virtual |
Set all position attributes of sites.
vPositions | A vector with all site positions. |
Implements bpp::AlignedValuesContainer.
Definition at line 335 of file VectorProbabilisticSiteContainer.cpp.
References getNumberOfSites(), and getSite().
|
inlinevirtualinherited |
Reimplemented from bpp::PositionedContainer< T >.
Definition at line 139 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by addSequence(), bpp::AlignedSequenceContainer::addSequence(), bpp::AlignedSequenceContainer::AlignedSequenceContainer(), and bpp::AlignedSequenceContainer::operator=().
|
inlinevirtualinherited |
Reimplemented from bpp::PositionedContainer< T >.
Definition at line 139 of file VectorPositionedContainer.h.
|
inlinevirtualinherited |
Output to string.
Implements bpp::SequencedValuesContainer.
Definition at line 116 of file AbstractProbabilisticSequenceContainer.h.
References bpp::AbstractProbabilisticSequenceContainer::getSequence(), and bpp::CruxSymbolList::toString().
|
inherited |
Convert a particular sequence to a string.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
|
inlinevirtualinherited |
Implements bpp::OrderedValuesContainer.
Definition at line 142 of file AbstractProbabilisticSequenceContainer.h.
References bpp::AbstractProbabilisticSequenceContainer::getSequence(), and bpp::CruxSymbolList::toString().
|
protectedinherited |
The container's alphabet.
Definition at line 64 of file AbstractValuesContainer.h.
Referenced by bpp::AbstractValuesContainer::getAlphabet(), bpp::AbstractValuesContainer::operator=(), and bpp::AbstractSequenceContainer::operator=().
|
protectedinherited |
Definition at line 63 of file Commentable.h.
Referenced by bpp::Commentable::clearComments(), bpp::Commentable::getComments(), bpp::Commentable::operator=(), and bpp::Commentable::setComments().
|
privateinherited |
Definition at line 86 of file VectorMappedContainer.h.
|
privateinherited |
Definition at line 69 of file MappedNamedContainer.h.
Referenced by bpp::MappedNamedContainer< T >::addObject(), bpp::MappedNamedContainer< T >::addObject_(), bpp::MappedNamedContainer< T >::changeName(), bpp::MappedNamedContainer< T >::clear(), bpp::MappedNamedContainer< T >::deleteObject(), bpp::MappedNamedContainer< T >::getObject(), bpp::MappedNamedContainer< T >::getObjectNames(), bpp::MappedNamedContainer< T >::getSize(), bpp::MappedNamedContainer< T >::hasObject(), bpp::MappedNamedContainer< T >::operator=(), and bpp::MappedNamedContainer< T >::removeObject().
|
protectedinherited |
Definition at line 73 of file VectorPositionedContainer.h.
|
protectedinherited |
Definition at line 73 of file VectorPositionedContainer.h.
Referenced by bpp::VectorPositionedContainer< T >::addObject(), bpp::VectorPositionedContainer< T >::addObject_(), bpp::VectorPositionedContainer< T >::appendObject(), bpp::VectorPositionedContainer< T >::clear(), bpp::VectorPositionedContainer< T >::deleteObject(), bpp::VectorPositionedContainer< T >::deleteObjects(), bpp::VectorPositionedContainer< T >::getObject(), bpp::VectorPositionedContainer< T >::getObject_(), bpp::VectorPositionedContainer< T >::getSize(), bpp::VectorPositionedContainer< T >::insertObject(), bpp::VectorPositionedContainer< T >::isAvailablePosition(), bpp::VectorPositionedContainer< T >::nullify(), bpp::VectorPositionedContainer< T >::operator=(), bpp::VectorPositionedContainer< T >::removeObject(), bpp::VectorPositionedContainer< T >::setSize(), and bpp::VectorPositionedContainer< T >::~VectorPositionedContainer().
|
privateinherited |
Definition at line 79 of file VectorMappedContainer.h.