bpp-seq3
3.0.0
|
The VectorProbabilisticSequenceContainer class. More...
#include <Bpp/Seq/Container/VectorProbabilisticSequenceContainer.h>
Public Member Functions | |
VectorProbabilisticSequenceContainer (const std::vector< std::shared_ptr< ProbabilisticSequence >> &vs, const Alphabet *alpha) | |
Build a container with shared Sequences. More... | |
VectorProbabilisticSequenceContainer (const Alphabet *alpha) | |
Build an empty container that will contain sequences of a particular alphabet. More... | |
VectorProbabilisticSequenceContainer & | operator= (const VectorProbabilisticSequenceContainer &vsc) |
Assign from a VectorProbabilisticSequenceContainer. More... | |
void | clear () |
Delete all objects in the container. More... | |
std::string | toString (const std::string &name) const |
Convert a particular sequence to a string. More... | |
std::string | toString (size_t sequenceIndex) const |
const Comments & | getComments (const std::string &name) const |
Get comments of a particular sequence. More... | |
virtual const Comments & | getComments (size_t sequenceIndex) const |
void | setComments (const std::string &name, const Comments &comments) |
Set the comments of a particular sequence. More... | |
const std::string & | getName (size_t sequenceIndex) const |
Get the name of a particular row of the alignement (aka sequence). More... | |
size_t | getSequencePosition (const std::string &name) const |
Get the position of a sequence in sequence container from its name. More... | |
const ProbabilisticSequence & | getSequence (size_t sequenceIndex) const |
void | setSequence (size_t sequenceIndex, const ProbabilisticSequence &sequence, bool checkName=true) |
std::shared_ptr< ProbabilisticSequence > | removeSequence (size_t sequenceIndex) |
void | setComments (size_t sequenceIndex, const Comments &comments) |
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 const Comments & | getComments (const std::string &name) const=0 |
Get comments of a particular sequence. More... | |
const Comments & | getComments () const |
Get the comments. More... | |
virtual std::string | toString (const std::string &name) const=0 |
Convert a particular sequence to a string. 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 () |
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... | |
Copy contructors: | |
VectorProbabilisticSequenceContainer (const VectorProbabilisticSequenceContainer &vsc) | |
Copy from a VectorProbabilisticSequenceContainer. More... | |
The Clonable interface. | |
VectorProbabilisticSequenceContainer * | clone () const |
The SequenceContainer interface. | |
bool | hasSequence (const std::string &name) const |
Check if a sequence with a given name is present in the container. More... | |
const ProbabilisticSequence & | getSequence (const std::string &name) const |
void | setSequence (const std::string &name, const ProbabilisticSequence &sequence, bool checkName=true) |
std::shared_ptr< ProbabilisticSequence > | removeSequence (const std::string &name) |
size_t | getNumberOfSequences () const |
Get the number of sequences in the container. 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... | |
VectorProbabilisticSequenceContainer * | createEmptyContainer () const |
Return a copy of this container, but with no data inside. More... | |
Add sequence to this container. | |
virtual void | addSequence (const ProbabilisticSequence &sequence, bool checkName=true) |
Add a sequence at the end of the container. More... | |
virtual void | addSequence (const std::shared_ptr< ProbabilisticSequence > sequence, bool checkName=true) |
Add a sequence at the end of the container. More... | |
virtual void | addSequence (const ProbabilisticSequence &sequence, size_t sequenceIndex, bool checkName=true) |
Add a sequence to the container at a particular position. More... | |
From the SequencedValuesContainer interface | |
const Alphabet * | getAlphabet () const |
Get container's alphabet. 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... | |
Protected Member Functions | |
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 |
AbstractSequenceContainer methods. | |
ProbabilisticSequence & | getSequence_ (size_t i) |
ProbabilisticSequence & | getSequence_ (const std::string &name) |
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 |
double | getStateValueAt (size_t siteIndex, size_t sequenceIndex, int state) const |
double | operator() (size_t siteIndex, size_t sequenceIndex, int state) const |
Protected Attributes | |
const Alphabet * | alphabet_ |
The container's alphabet. More... | |
Comments | comments_ |
std::vector< std::shared_ptr< T > > | positions_ |
Private Member Functions | |
virtual void | setSize (size_t size) |
Private Attributes | |
std::vector< std::string > | vNames_ |
std::map< std::string, size_t > | mNames_ |
std::map< std::string, std::shared_ptr< T > > | mObjects_ |
The VectorProbabilisticSequenceContainer class.
This is the simplest implementation of the OrderedValuesContainer interface for ProbabilisticSequences ProbabilisticSequences are stored in a std::vector of shared pointers.
Definition at line 63 of file VectorProbabilisticSequenceContainer.h.
VectorProbabilisticSequenceContainer::VectorProbabilisticSequenceContainer | ( | const std::vector< std::shared_ptr< ProbabilisticSequence >> & | vs, |
const Alphabet * | alpha | ||
) |
Build a container with shared Sequences.
Class constructors:
Definition at line 51 of file VectorProbabilisticSequenceContainer.cpp.
References addSequence().
Referenced by clone(), and createEmptyContainer().
|
inline |
Build an empty container that will contain sequences of a particular alphabet.
alpha | The alphabet of the container. |
Definition at line 82 of file VectorProbabilisticSequenceContainer.h.
VectorProbabilisticSequenceContainer::VectorProbabilisticSequenceContainer | ( | const VectorProbabilisticSequenceContainer & | vsc | ) |
Copy from a VectorProbabilisticSequenceContainer.
vsc | The VectorProbabilisticSequenceContainer to copy into this container. |
Copy constructors:
Definition at line 63 of file VectorProbabilisticSequenceContainer.cpp.
References addSequence(), getNumberOfSequences(), and getSequence().
|
inlineprotectedinherited |
Definition at line 226 of file VectorMappedContainer.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 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().
|
inlinevirtual |
Add a sequence at the end of the container.
The sequence is copied into the container. If checkNames is set to true, the method check if the name of the sequence is already used in the container, and sends an exception if it is the case. Otherwise, do not check the name: the method is hence faster, but use it at your own risks!
sequence | The sequence to add. |
checkName | Tell if the method must check the name of the sequence before adding it. |
Definition at line 244 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::appendObject(), bpp::ProbabilisticSequence::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), and bpp::CoreSequence::getName().
Referenced by VectorProbabilisticSequenceContainer().
|
inlinevirtual |
Add a sequence to the container at a particular position.
The sequence is copied into the container. If checkName is set to true, the method check if the name of the sequence is already used in the container, and sends an exception if it is the case. Otherwise, do not check the name: the method is hence faster, but use it at your own risks!
sequence | The sequence to add. |
sequenceIndex | The position where to insert the new sequence. All the following sequences will be pushed. |
checkName | Tell if the method must check the name of the sequence before adding it. |
Exception | If the sequence couldn't be added to the container. |
Definition at line 291 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::addObject(), bpp::ProbabilisticSequence::clone(), and bpp::CoreSequence::getName().
|
inlinevirtual |
Add a sequence at the end of the container.
The sequence is shared with the container. If checkNames is set to true, the method check if the name of the sequence is already used in the container, and sends an exception if it is the case. Otherwise, do not check the name: the method is hence faster, but use it at your own risks!
sequence | The sequence to add. |
checkName | Tell if the method must check the name of the sequence before adding it. |
Exception | If the sequence couldn't be added to the container. |
Definition at line 267 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::appendObject(), and bpp::AbstractValuesContainer::getAlphabet().
|
inlineprotectedinherited |
Definition at line 250 of file VectorMappedContainer.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(), bpp::VectorProbabilisticSiteContainer::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(), bpp::VectorProbabilisticSiteContainer::setSequence(), and bpp::VectorSiteContainer::setSequence().
|
inlinevirtual |
Delete all objects in the container.
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 107 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< T >::clear().
Referenced by operator=().
|
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 |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 155 of file VectorProbabilisticSequenceContainer.h.
References VectorProbabilisticSequenceContainer().
|
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 116 of file VectorProbabilisticSequenceContainer.cpp.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::AbstractValuesContainer::getGeneralComments(), bpp::AbstractValuesContainer::setGeneralComments(), and VectorProbabilisticSequenceContainer().
|
inlinevirtualinherited |
Delete the comments associated to this container.
Implements bpp::SequencedValuesContainer.
Definition at line 115 of file AbstractValuesContainer.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.
|
inlineprotectedinherited |
Definition at line 238 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::AlignedSequenceContainer::deleteSites(), bpp::VectorProbabilisticSiteContainer::deleteSites(), and bpp::VectorSiteContainer::deleteSites().
|
inlinevirtualinherited |
Get container's alphabet.
Implements bpp::SequencedValuesContainer.
Definition at line 99 of file AbstractValuesContainer.h.
References bpp::AbstractValuesContainer::alphabet_.
Referenced by addSequence(), bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::VectorSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), bpp::VectorProbabilisticSiteContainer::addSite(), bpp::Pasta::appendSequencesFromStream(), bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorProbabilisticSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::getSequence(), bpp::VectorSiteContainer::getSequence(), bpp::VectorProbabilisticSiteContainer::getSequence(), bpp::AlignedSequenceContainer::getSite(), bpp::CompressedVectorSiteContainer::getStateValueAt(), bpp::VectorProbabilisticSiteContainer::getStateValueAt(), bpp::VectorSiteContainer::getStateValueAt(), getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::CompressedVectorSiteContainer::operator()(), bpp::VectorProbabilisticSiteContainer::operator()(), bpp::VectorSiteContainer::operator()(), operator()(), bpp::VectorSequenceContainer::operator()(), bpp::VectorProbabilisticSiteContainer::realloc(), bpp::VectorSiteContainer::realloc(), bpp::CompressedVectorSiteContainer::removeSite(), bpp::CompressedVectorSiteContainer::setComments(), bpp::VectorProbabilisticSiteContainer::setSequence(), 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 bpp::VectorProbabilisticSiteContainer::getSequence().
|
inlinevirtual |
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 124 of file VectorProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getComments(), and 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. |
|
inlinevirtual |
Implements bpp::AbstractValuesContainer.
Definition at line 129 of file VectorProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getComments(), and getSequence().
|
inlinevirtualinherited |
Get the comments of this container.
Implements bpp::SequencedValuesContainer.
Definition at line 101 of file AbstractValuesContainer.h.
References bpp::Commentable::getComments().
Referenced by bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), and bpp::VectorSiteContainer::createEmptyContainer().
|
inlinevirtual |
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 140 of file VectorProbabilisticSequenceContainer.h.
References bpp::CoreSequence::getName(), and 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 187 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getSize().
Referenced by getStateValueAt(), setSequenceNames(), and VectorProbabilisticSequenceContainer().
|
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 |
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.
|
inlineprotectedinherited |
Definition at line 251 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
|
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.
|
inline |
Definition at line 172 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObject().
Referenced by getComments(), getName(), getStateValueAt(), operator()(), toString(), and VectorProbabilisticSequenceContainer().
|
inline |
Definition at line 201 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObject().
|
inlineprotected |
Definition at line 308 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObject().
|
inlineprotected |
Definition at line 302 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObject().
Referenced by setComments(), and setSequenceNames().
|
inlinevirtual |
Get all the names of the sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 189 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObjectNames().
|
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 145 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::getObjectPosition().
Referenced by removeSequence(), setComments(), and setSequence().
|
inlinevirtualinherited |
Get the number of objects in the container.
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 133 of file VectorMappedContainer.h.
|
inlineprotectedvirtual |
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 313 of file VectorProbabilisticSequenceContainer.h.
References getSequence(), and bpp::CruxSymbolList::getStateValueAt().
|
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 |
|
inlineprotectedvirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 323 of file VectorProbabilisticSequenceContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSequences(), getSequence(), bpp::Alphabet::getStateIndex(), and bpp::CruxSymbolList::size().
|
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 167 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::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.
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 bpp::VectorProbabilisticSiteContainer::getSequence().
|
inlineinherited |
Definition at line 134 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
|
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(), bpp::VectorProbabilisticSiteContainer::addSite(), and bpp::AlignedSequenceContainer::setSequence().
|
inlineprotectedvirtual |
Implements bpp::SequencedValuesContainer.
Definition at line 318 of file VectorProbabilisticSequenceContainer.h.
References getSequence().
|
inlineprotectedvirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 334 of file VectorProbabilisticSequenceContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getSequence(), and bpp::Alphabet::getStateIndex().
VectorProbabilisticSequenceContainer & VectorProbabilisticSequenceContainer::operator= | ( | const VectorProbabilisticSequenceContainer & | vsc | ) |
Assign from a VectorProbabilisticSequenceContainer.
vsc | The VectorProbabilisticSequenceContainer to copy into this container. |
Assignation operator:
Definition at line 76 of file VectorProbabilisticSequenceContainer.cpp.
References clear(), bpp::AbstractValuesContainer::operator=(), and bpp::VectorMappedContainer< T >::operator=().
|
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.
|
inline |
Definition at line 182 of file VectorProbabilisticSequenceContainer.h.
References getSequencePosition().
|
inline |
Definition at line 214 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::removeObject().
|
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().
|
inlinevirtual |
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. |
Reimplemented from bpp::AbstractValuesContainer.
Definition at line 134 of file VectorProbabilisticSequenceContainer.h.
References 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 setComments().
|
inlinevirtual |
Implements bpp::AbstractValuesContainer.
Definition at line 219 of file VectorProbabilisticSequenceContainer.h.
References getSequence_(), and bpp::CoreSequence::setComments().
|
inlinevirtualinherited |
Set the comments of this container.
comments | The comments to be associated to this container. |
Implements bpp::SequencedValuesContainer.
Definition at line 106 of file AbstractValuesContainer.h.
References bpp::Commentable::setComments().
Referenced by bpp::AlignedSequenceContainer::AlignedSequenceContainer(), bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::SiteContainerTools::getSelectedSites(), bpp::AbstractSequenceContainer::operator=(), and bpp::VectorSequenceContainer::VectorSequenceContainer().
|
inlineprotectedinherited |
Definition at line 219 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 203 of file VectorMappedContainer.h.
|
inline |
Definition at line 177 of file VectorProbabilisticSequenceContainer.h.
References getSequencePosition().
|
inline |
Definition at line 206 of file VectorProbabilisticSequenceContainer.h.
References bpp::VectorMappedContainer< ProbabilisticSequence >::addObject(), bpp::ProbabilisticSequence::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), and bpp::CoreSequence::getName().
|
virtual |
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 88 of file VectorProbabilisticSequenceContainer.cpp.
References getNumberOfSequences(), getSequence_(), bpp::CoreSequence::setName(), and bpp::VectorMappedContainer< ProbabilisticSequence >::setObjectNames().
|
inlinevirtualinherited |
Reimplemented in bpp::VectorPositionedContainer< T >, bpp::VectorPositionedContainer< ProbabilisticSite >, and bpp::VectorPositionedContainer< Site >.
Definition at line 76 of file PositionedContainer.h.
|
inlinevirtualinherited |
Reimplemented from bpp::PositionedContainer< T >.
Definition at line 139 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::AlignedSequenceContainer::addSequence(), bpp::AlignedSequenceContainer::AlignedSequenceContainer(), and bpp::AlignedSequenceContainer::operator=().
|
inlinevirtual |
Convert a particular sequence to a string.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implements bpp::SequencedValuesContainer.
Definition at line 114 of file VectorProbabilisticSequenceContainer.h.
References 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. |
|
inlinevirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 119 of file VectorProbabilisticSequenceContainer.h.
References 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.
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.