bpp-seq3
3.0.0
|
The VectorSiteContainer class. More...
#include <Bpp/Seq/Container/VectorSiteContainer.h>
Public Member Functions | |
VectorSiteContainer (const std::vector< const CruxSymbolListSite * > &vs, const Alphabet *alpha, bool checkPositions=true) | |
Build a new container from a set of sites. More... | |
VectorSiteContainer (const std::vector< const Site * > &vs, const Alphabet *alpha, bool checkPositions=true) | |
VectorSiteContainer (size_t size, const Alphabet *alpha) | |
Build a new empty container with specified size. More... | |
VectorSiteContainer (const std::vector< std::string > &names, const Alphabet *alpha) | |
Build a new empty container with specified sequence names. More... | |
VectorSiteContainer (const Alphabet *alpha) | |
Build a new empty container. More... | |
VectorSiteContainer (const VectorSiteContainer &vsc) | |
VectorSiteContainer (const SiteContainer &sc) | |
VectorSiteContainer (const OrderedSequenceContainer &osc) | |
VectorSiteContainer (const SequenceContainer &sc) | |
VectorSiteContainer (const AlignedValuesContainer &avc) | |
VectorSiteContainer & | operator= (const VectorSiteContainer &vsc) |
VectorSiteContainer & | operator= (const SiteContainer &sc) |
VectorSiteContainer & | operator= (const OrderedSequenceContainer &osc) |
VectorSiteContainer & | operator= (const SequenceContainer &sc) |
virtual | ~VectorSiteContainer () |
void | addSequence (const Sequence &sequence, bool checkName=true) |
Add a sequence to the container. More... | |
void | addSequence (const Sequence &sequence, size_t sequenceIndex, bool checkName=true) |
void | setSequence (const std::string &name, const Sequence &sequence, bool checkName) |
Replace a sequence in the container. More... | |
void | setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName) |
Replace a sequence in the container. More... | |
std::string | toString (const std::string &name) const |
Convert a particular sequence to a string. More... | |
const Comments & | getComments (const std::string &name) const |
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... | |
void | setComments (const Comments &comments) |
Set the comments. More... | |
virtual const Alphabet * | getAlphabet () const =0 |
Get container's alphabet. More... | |
virtual double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const=0 |
get value of a state in a position More... | |
virtual const Comments & | getGeneralComments () const =0 |
Get the comments of this container. More... | |
virtual void | setGeneralComments (const Comments &comments)=0 |
Set the comments of this container. More... | |
virtual void | deleteGeneralComments ()=0 |
Delete the comments associated to this container. More... | |
void | clearComments () |
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. | |
VectorSiteContainer * | clone () const |
The SiteContainer interface implementation: | |
const Site & | getSite (size_t siteIndex) const |
Get a site from the container. More... | |
const CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) const |
Get a CruxSymbolListSite from a given position. More... | |
Site & | getSite (size_t siteIndex) |
CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) |
void | setSite (size_t siteIndex, const Site &site, bool checkPosition=true) |
Set a site in the container. More... | |
std::shared_ptr< Site > | removeSite (size_t siteIndex) |
Remove a site from the container. More... | |
void | deleteSite (size_t siteIndex) |
Delete a site from the container. More... | |
void | addSite (const Site &site, bool checkPosition=true) |
Add a site in the container. More... | |
void | addSite (const Site &site, int position, bool checkPosition=true) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, bool checkPosition=true) |
Add a site in the container. More... | |
void | addSite (const Site &site, size_t siteIndex, int position, bool checkPosition=true) |
Add a site in the container. More... | |
From AlignedValuesContainer interface | |
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... | |
The SequenceContainer interface. | |
void | setComments (size_t sequenceIndex, const Comments &comments) |
const Sequence & | getSequence (size_t sequenceIndex) const |
Retrieve a sequence object from the container. More... | |
const Sequence & | getSequence (const std::string &name) const |
Retrieve a sequence object from 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::shared_ptr< Sequence > | removeSequence (size_t sequenceIndex) |
Extract (and remove) a sequence from the container. More... | |
std::shared_ptr< Sequence > | removeSequence (const std::string &name) |
Extract (and remove) a sequence from the container. More... | |
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... | |
void | clear () |
Delete all objects in the container. More... | |
VectorSiteContainer * | createEmptyContainer () const |
Return a copy of this container, but with no data inside. More... | |
int & | valueAt (const std::string &sequenceName, size_t elementIndex) |
Element access function. More... | |
const int & | valueAt (const std::string &sequenceName, size_t elementIndex) const |
Element access function. More... | |
int & | operator() (const std::string &sequenceName, size_t elementIndex) |
Element access operator. More... | |
const int & | operator() (const std::string &sequenceName, size_t elementIndex) const |
Element access operator. More... | |
int & | valueAt (size_t sequenceIndex, size_t elementIndex) |
Element access operator. More... | |
const int & | valueAt (size_t sequenceIndex, size_t elementIndex) const |
Element access operator. More... | |
int & | operator() (size_t sequenceIndex, size_t elementIndex) |
Element access operator. More... | |
const int & | operator() (size_t sequenceIndex, size_t elementIndex) const |
Element access operator. More... | |
virtual void | setComments (size_t sequenceIndex, const Comments &comments)=0 |
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 |
OrderedValuesContainer methods. | |
double | getStateValueAt (size_t siteIndex, size_t sequenceIndex, int state) const |
double | operator() (size_t siteIndex, size_t sequenceIndex, 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... | |
SequenceContainer methods. | |
virtual std::string | toString (size_t sequenceIndex) const=0 |
virtual const Comments & | getComments (size_t sequenceIndex) const=0 |
virtual const Sequence & | getSequence (const std::string &name) const=0 |
Retrieve a sequence object from the container. More... | |
virtual void | setSequence (const std::string &name, const Sequence &sequence, bool checkName)=0 |
Replace a sequence in the container. More... | |
virtual std::shared_ptr< Sequence > | removeSequence (const std::string &name)=0 |
Extract (and remove) a sequence from the container. 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 | |
void | realloc (size_t n) |
const std::shared_ptr< Site > | 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< Site > | getObject (size_t objectIndex) |
void | addObject (std::shared_ptr< Site > object, size_t objectIndex, bool checkPosition=false) |
Add an object. More... | |
void | insertObject (std::shared_ptr< Site > object, size_t objectIndex) |
Insert an object. More... | |
std::shared_ptr< Site > | 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< Site > object) |
std::shared_ptr< Site > | getObject_ (size_t objectIndex) const |
void | addObject_ (std::shared_ptr< Site > 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< Sequence > | 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< Sequence > | getObject (size_t objectIndex) |
const std::shared_ptr< Sequence > | getObject (const std::string &name) const |
Get a object. More... | |
std::shared_ptr< Sequence > | 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< Sequence > 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< Sequence > 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< Sequence > object, const std::string &name, bool check=true) |
void | appendObject (std::shared_ptr< T > object) |
std::shared_ptr< Sequence > | removeObject (size_t objectIndex) |
Extract and remove a object from the container. More... | |
std::shared_ptr< Sequence > | 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< Sequence > 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< Site > > | 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_ |
The VectorSiteContainer class.
Sites are stored in a std::vector of pointers. Site access is hence in , and sequence access in , where is the number of sites in the container.
Sequences are built & stored on the fly, with a cache for time efficiency.
See VectorSequenceContainer for an alternative implementation.
Definition at line 75 of file VectorSiteContainer.h.
VectorSiteContainer::VectorSiteContainer | ( | 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. |
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 53 of file VectorSiteContainer.cpp.
References addSite(), and bpp::TextTools::toString().
Referenced by clone(), and createEmptyContainer().
VectorSiteContainer::VectorSiteContainer | ( | const std::vector< const Site * > & | vs, |
const Alphabet * | alpha, | ||
bool | checkPositions = true |
||
) |
Definition at line 81 of file VectorSiteContainer.cpp.
References addSite(), and bpp::TextTools::toString().
VectorSiteContainer::VectorSiteContainer | ( | size_t | size, |
const Alphabet * | alpha | ||
) |
Build a new empty container with specified size.
size | Number of sequences in the container. |
alpha | The alphabet for this container. |
Definition at line 108 of file VectorSiteContainer.cpp.
References bpp::TextTools::toString().
VectorSiteContainer::VectorSiteContainer | ( | 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 121 of file VectorSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::appendObject().
VectorSiteContainer::VectorSiteContainer | ( | const Alphabet * | alpha | ) |
Build a new empty container.
alpha | The alphabet for this container. |
Definition at line 134 of file VectorSiteContainer.cpp.
VectorSiteContainer::VectorSiteContainer | ( | const VectorSiteContainer & | vsc | ) |
Definition at line 142 of file VectorSiteContainer.cpp.
References addSite(), getNumberOfSites(), and getSite().
VectorSiteContainer::VectorSiteContainer | ( | const SiteContainer & | sc | ) |
Definition at line 155 of file VectorSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AlignedValuesContainer::getNumberOfSites(), bpp::SequencedValuesContainer::getSequenceNames(), and bpp::SiteContainer::getSite().
VectorSiteContainer::VectorSiteContainer | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 170 of file VectorSiteContainer.cpp.
References addSequence(), bpp::SequencedValuesContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), and reindexSites().
VectorSiteContainer::VectorSiteContainer | ( | const SequenceContainer & | sc | ) |
Definition at line 183 of file VectorSiteContainer.cpp.
References addSequence(), bpp::SequenceContainer::getSequence(), bpp::SequencedValuesContainer::getSequenceNames(), and reindexSites().
VectorSiteContainer::VectorSiteContainer | ( | const AlignedValuesContainer & | avc | ) |
Definition at line 196 of file VectorSiteContainer.cpp.
References addSite(), bpp::OrderedValuesContainer::getName(), bpp::SequencedValuesContainer::getNumberOfSequences(), bpp::AlignedValuesContainer::getNumberOfSites(), bpp::AlignedValuesContainer::getSymbolListSite(), and bpp::TextTools::toString().
|
inlinevirtual |
Definition at line 131 of file VectorSiteContainer.h.
References clear().
|
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 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 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::SequenceContainer.
Definition at line 633 of file VectorSiteContainer.cpp.
References bpp::Site::addElement(), bpp::VectorMappedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::CoreSequence::getComments(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), getSite(), bpp::CoreSymbolList< T >::getValue(), realloc(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), and VectorSiteContainer().
void VectorSiteContainer::addSequence | ( | const Sequence & | sequence, |
size_t | sequenceIndex, | ||
bool | checkName = true |
||
) |
Definition at line 661 of file VectorSiteContainer.cpp.
References bpp::Site::addElement(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::CoreSequence::getComments(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), getSite(), bpp::CoreSymbolList< T >::getValue(), bpp::VectorMappedContainer< T >::insertObject(), and bpp::CruxSymbolList::size().
|
virtual |
Add a site in the container.
site | The site to add. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 320 of file VectorSiteContainer.cpp.
References bpp::VectorPositionedContainer< T >::appendObject(), bpp::Site::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::OrderedSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), getSite(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
Referenced by bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSitesWithoutGaps(), operator=(), realloc(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SiteContainerTools::sampleSites(), and VectorSiteContainer().
|
virtual |
Add a site in the container.
site | The site to add. |
position | The new position of the site, to superseed the one in 'site'. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 361 of file VectorSiteContainer.cpp.
References bpp::VectorPositionedContainer< T >::appendObject(), bpp::Site::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), getSite(), bpp::VectorPositionedContainer< T >::nullify(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
|
virtual |
Add a site in the container.
site | The site to add. |
siteIndex | The position where to insert the site. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 395 of file VectorSiteContainer.cpp.
References bpp::Site::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::OrderedSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), getSite(), bpp::VectorPositionedContainer< T >::insertObject(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
|
virtual |
Add a site in the container.
site | The site to add. |
siteIndex | The position where to insert the site. |
position | The new position of the site, to superseed the one in 'site'. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 437 of file VectorSiteContainer.cpp.
References bpp::Site::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::OrderedSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), getSite(), bpp::VectorPositionedContainer< T >::insertObject(), bpp::CruxSymbolList::size(), and bpp::TextTools::toString().
|
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(), 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 setSequence().
|
virtual |
Delete all objects in the container.
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 688 of file VectorSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::clear(), and bpp::VectorPositionedContainer< T >::clear().
Referenced by operator=(), realloc(), and ~VectorSiteContainer().
|
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::SiteContainer.
Definition at line 139 of file VectorSiteContainer.h.
References VectorSiteContainer().
|
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 716 of file VectorSiteContainer.cpp.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::AbstractValuesContainer::getGeneralComments(), bpp::AbstractValuesContainer::setGeneralComments(), and VectorSiteContainer().
|
inlinevirtualinherited |
Delete the comments associated to this container.
Implements bpp::SequencedValuesContainer.
Definition at line 115 of file AbstractValuesContainer.h.
References bpp::Commentable::clearComments().
|
pure virtualinherited |
Delete the comments associated to this container.
Implemented in bpp::AbstractValuesContainer, and bpp::AbstractProbabilisticSequenceContainer.
|
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.
|
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 deleteSites().
|
inlinevirtual |
Delete a site from the container.
The site is deleted (ie the container is shortened).
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::SiteContainer.
Definition at line 174 of file VectorSiteContainer.h.
References bpp::VectorPositionedContainer< T >::deleteObject().
|
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 191 of file VectorSiteContainer.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(), bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::VectorSequenceContainer::addSequence(), addSequence(), bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), addSite(), bpp::VectorProbabilisticSiteContainer::addSite(), bpp::Pasta::appendSequencesFromStream(), bpp::AlignedSequenceContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorProbabilisticSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::CompressedVectorSiteContainer::getSequence(), getSequence(), bpp::VectorProbabilisticSiteContainer::getSequence(), bpp::AlignedSequenceContainer::getSite(), bpp::CompressedVectorSiteContainer::getStateValueAt(), bpp::VectorProbabilisticSiteContainer::getStateValueAt(), getStateValueAt(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::CompressedVectorSiteContainer::operator()(), bpp::VectorProbabilisticSiteContainer::operator()(), operator()(), bpp::VectorProbabilisticSequenceContainer::operator()(), bpp::VectorSequenceContainer::operator()(), bpp::VectorProbabilisticSiteContainer::realloc(), realloc(), bpp::CompressedVectorSiteContainer::removeSite(), bpp::CompressedVectorSiteContainer::setComments(), bpp::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorProbabilisticSequenceContainer::setSequence(), setSequence(), bpp::VectorSequenceContainer::setSequence(), bpp::AlignedSequenceContainer::setSite(), bpp::CompressedVectorSiteContainer::setSite(), and setSite().
|
pure virtualinherited |
Get container's alphabet.
Implemented in bpp::AbstractValuesContainer.
Referenced by bpp::Clustal::appendAlignmentFromStream(), bpp::DCSE::appendAlignmentFromStream(), bpp::NexusIOSequence::appendAlignmentFromStream(), bpp::Fasta::appendSequencesFromStream(), bpp::GenBank::appendSequencesFromStream(), bpp::Mase::appendSequencesFromStream(), bpp::SiteContainerTools::changeGapsToUnknownCharacters(), bpp::SiteContainerTools::changeUnresolvedCharactersToGaps(), bpp::SequenceContainerTools::convertAlphabet(), bpp::SequenceContainerTools::getCodonPosition(), bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getConsensus(), bpp::SequenceContainerTools::getFrequencies(), bpp::SiteContainerTools::getSelectedPositions(), bpp::MaseTools::getSelectedSequences(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSequencePositions(), bpp::SequenceApplicationTools::getSitesToAnalyse(), bpp::SiteContainerTools::getSitesWithoutGaps(), bpp::SequenceContainerTools::merge(), bpp::SiteContainerTools::merge(), bpp::AbstractSequenceContainer::operator=(), bpp::Phylip::readInterleaved(), bpp::Phylip::readSequential(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SiteContainerTools::sampleSites(), bpp::Phylip::writeInterleaved(), and bpp::Phylip::writeSequential().
|
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().
|
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 111 of file AbstractSequenceContainer.h.
References bpp::CoreSequence::getComments(), and bpp::OrderedSequenceContainer::getSequence().
|
inlinevirtualinherited |
Implements bpp::AbstractValuesContainer.
Definition at line 137 of file AbstractSequenceContainer.h.
References bpp::CoreSequence::getComments(), and bpp::OrderedSequenceContainer::getSequence().
|
inherited |
|
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(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), and createEmptyContainer().
|
pure virtualinherited |
Get the comments of this container.
Implemented in bpp::AbstractValuesContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by bpp::AlignedSequenceContainer::AlignedSequenceContainer(), bpp::Mase::appendSequencesFromStream(), bpp::MaseTools::getSelectedSequences(), bpp::SiteContainerTools::getSelectedSites(), bpp::MaseTools::getSelectedSites(), bpp::AbstractSequenceContainer::operator=(), bpp::VectorSequenceContainer::VectorSequenceContainer(), bpp::Stockholm::writeAlignment(), bpp::Fasta::writeSequences(), and bpp::Mase::writeSequences().
|
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 127 of file AbstractSequenceContainer.h.
References bpp::CoreSequence::getName(), and bpp::OrderedSequenceContainer::getSequence().
Referenced by bpp::VectorSequenceContainer::getSequenceNames(), and bpp::VectorSequenceContainer::hasSequenceByName().
|
inlineprotectedinherited |
Definition at line 144 of file VectorMappedContainer.h.
|
inlinevirtual |
Get the number of sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 255 of file VectorSiteContainer.h.
References bpp::VectorMappedContainer< T >::getNumberOfObjects().
Referenced by addSequence(), addSite(), getSequence(), bpp::SequenceApplicationTools::getSiteContainer(), getStateValueAt(), setSequence(), setSite(), and valueAt().
|
inlinevirtual |
Get the number of aligned positions in the container.
Implements bpp::AlignedValuesContainer.
Definition at line 196 of file VectorSiteContainer.h.
References bpp::VectorPositionedContainer< T >::getSize().
Referenced by addSequence(), addSite(), bpp::SequenceApplicationTools::getAlignedContainer(), getSequence(), bpp::SequenceApplicationTools::getSiteContainer(), getSitePositions(), getStateValueAt(), operator=(), reindexSites(), removeSequence(), setSequence(), setSite(), setSitePositions(), valueAt(), and VectorSiteContainer().
|
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.
|
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.
|
virtual |
Retrieve a sequence object from the container.
name | The name of the sequence. |
Implements bpp::SequenceContainer.
Definition at line 547 of file VectorSiteContainer.cpp.
References bpp::OrderedSequenceContainer::getSequence(), and getSequencePosition().
|
inherited |
Retrieve a sequence object from the container.
name | The name of the sequence. |
Referenced by bpp::AlignedSequenceContainer::AlignedSequenceContainer(), bpp::VectorSequenceContainer::deleteSequenceByName(), bpp::AbstractSequenceContainer::getComments(), bpp::AbstractSequenceContainer::getName(), bpp::CompressedVectorSiteContainer::getSequence(), getSequence(), bpp::VectorSequenceContainer::getSequenceByName(), bpp::VectorSequenceContainer::getSequenceNames(), bpp::AlignedSequenceContainer::getSite(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::hasSequenceByName(), bpp::VectorSequenceContainer::operator()(), removeSequence(), bpp::VectorSequenceContainer::removeSequenceByName(), bpp::AbstractSequenceContainer::toString(), and bpp::VectorSequenceContainer::valueAt().
|
virtual |
Retrieve a sequence object from the container.
sequenceIndex | The position of the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 518 of file VectorSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::addObject_(), bpp::AbstractValuesContainer::getAlphabet(), bpp::OrderedSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::VectorMappedContainer< T >::getObject(), bpp::VectorMappedContainer< T >::getObjectName(), getSite(), and bpp::MappedNamedContainer< T >::isAvailableName().
Referenced by bpp::SequenceApplicationTools::getAlignedContainer(), and bpp::SequenceApplicationTools::getSiteContainer().
|
inlinevirtual |
Get all the names of the sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 260 of file VectorSiteContainer.h.
References bpp::VectorMappedContainer< T >::getObjectNames().
Referenced by bpp::SequenceApplicationTools::getAlignedContainer().
|
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 245 of file VectorSiteContainer.h.
References bpp::VectorMappedContainer< T >::getObjectPosition().
Referenced by getSequence(), operator()(), removeSequence(), setSequence(), and valueAt().
|
inlinevirtual |
Implements bpp::SiteContainer.
Definition at line 157 of file VectorSiteContainer.h.
References 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::SiteContainer.
Definition at line 147 of file VectorSiteContainer.h.
References bpp::VectorPositionedContainer< T >::getObject().
Referenced by addSequence(), addSite(), bpp::SiteContainerTools::getCompleteSites(), getSequence(), getSitePositions(), bpp::SiteContainerTools::getSitesWithoutGaps(), getSymbolListSite(), operator=(), reindexSites(), removeSequence(), bpp::SiteContainerTools::sampleSites(), setSequence(), setSite(), setSitePositions(), and VectorSiteContainer().
|
virtual |
Get all position attributes of sites.
Implements bpp::AlignedValuesContainer.
Definition at line 493 of file VectorSiteContainer.cpp.
References getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), 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 324 of file VectorSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSites(), bpp::Alphabet::isResolvedIn(), and valueAt().
|
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 354 of file VectorSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), getNumberOfSequences(), getNumberOfSites(), bpp::Alphabet::isResolvedIn(), and valueAt().
|
inlinevirtual |
Implements bpp::SiteContainer.
Definition at line 162 of file VectorSiteContainer.h.
References getSite().
|
inlinevirtual |
Get a CruxSymbolListSite from a given position.
siteIndex | The position |
Implements bpp::SiteContainer.
Definition at line 152 of file VectorSiteContainer.h.
References 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 235 of file VectorSiteContainer.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(), 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(), getSequence(), and bpp::VectorProbabilisticSiteContainer::getSequence().
|
inlineinherited |
Definition at line 134 of file VectorPositionedContainer.h.
|
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.
|
inlineinherited |
Nullify all elements.
Definition at line 163 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::AlignedSequenceContainer::addSequence(), addSite(), bpp::VectorProbabilisticSiteContainer::addSite(), and bpp::AlignedSequenceContainer::setSequence().
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::SequenceContainer.
Definition at line 286 of file VectorSiteContainer.h.
References getSequencePosition().
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::SequenceContainer.
Definition at line 291 of file VectorSiteContainer.h.
References getSequencePosition().
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 310 of file VectorSiteContainer.h.
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container. This method is faster then the valueAt function, but input parameters are not checked!
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 314 of file VectorSiteContainer.h.
|
inlinevirtual |
Implements bpp::SequencedValuesContainer.
Definition at line 331 of file VectorSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::Alphabet::isResolvedIn(), and valueAt().
|
inlinevirtual |
Implements bpp::OrderedValuesContainer.
Definition at line 362 of file VectorSiteContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::Alphabet::isResolvedIn(), and valueAt().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 252 of file VectorSiteContainer.cpp.
References addSequence(), clear(), bpp::SequencedValuesContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), bpp::AbstractSequenceContainer::operator=(), and reindexSites().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const SequenceContainer & | sc | ) |
Definition at line 268 of file VectorSiteContainer.cpp.
References addSequence(), clear(), bpp::SequenceContainer::getSequence(), bpp::SequencedValuesContainer::getSequenceNames(), bpp::AbstractSequenceContainer::operator=(), and reindexSites().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const SiteContainer & | sc | ) |
Definition at line 236 of file VectorSiteContainer.cpp.
References addSite(), bpp::VectorMappedContainer< T >::appendObject(), clear(), bpp::AlignedValuesContainer::getNumberOfSites(), bpp::SequencedValuesContainer::getSequenceNames(), bpp::SiteContainer::getSite(), and bpp::AbstractSequenceContainer::operator=().
VectorSiteContainer & VectorSiteContainer::operator= | ( | const VectorSiteContainer & | vsc | ) |
Definition at line 221 of file VectorSiteContainer.cpp.
References addSite(), clear(), getNumberOfSites(), getSite(), bpp::AbstractSequenceContainer::operator=(), and bpp::VectorMappedContainer< T >::operator=().
|
protected |
Definition at line 696 of file VectorSiteContainer.cpp.
References addSite(), clear(), bpp::AbstractValuesContainer::getAlphabet(), and reindexSites().
Referenced by addSequence(), and setSequence().
|
virtual |
Set all positions attributes.
Implements bpp::AlignedValuesContainer.
Definition at line 483 of file VectorSiteContainer.cpp.
References getNumberOfSites(), getSite(), and bpp::AbstractCoreSite::setPosition().
Referenced by bpp::SequenceApplicationTools::getSiteContainer(), operator=(), realloc(), and VectorSiteContainer().
|
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.
|
virtual |
Extract (and remove) a sequence from the container.
name | The name of the sequence. |
Implements bpp::SequenceContainer.
Definition at line 624 of file VectorSiteContainer.cpp.
References getSequencePosition(), and bpp::OrderedSequenceContainer::removeSequence().
|
inherited |
Extract (and remove) a sequence from the container.
name | The name of the sequence. |
Referenced by removeSequence(), bpp::VectorSequenceContainer::removeSequenceByKey(), and bpp::VectorSequenceContainer::removeSequenceByName().
|
virtual |
Extract (and remove) a sequence from the container.
sequenceIndex | The position of the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 612 of file VectorSiteContainer.cpp.
References bpp::CruxSymbolList::deleteElement(), getNumberOfSites(), bpp::OrderedSequenceContainer::getSequence(), getSite(), and bpp::VectorMappedContainer< T >::removeObject().
|
inlinevirtual |
Remove a site from the container.
The site is deleted (ie the container is shortened) and a pointer toward it is returned.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implements bpp::SiteContainer.
Definition at line 169 of file VectorSiteContainer.h.
References bpp::VectorPositionedContainer< T >::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().
|
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 116 of file AbstractSequenceContainer.h.
References bpp::OrderedValuesContainer::getSequencePosition(), and bpp::OrderedSequenceContainer::setComments().
|
virtual |
Implements bpp::AbstractSequenceContainer.
Definition at line 709 of file VectorSiteContainer.cpp.
References bpp::VectorMappedContainer< T >::getObject().
virtual void bpp::OrderedValuesContainer::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(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), createEmptyContainer(), bpp::SiteContainerTools::getSelectedSites(), bpp::AbstractSequenceContainer::operator=(), and bpp::VectorSequenceContainer::VectorSequenceContainer().
|
pure virtualinherited |
Set the comments of this container.
comments | The comments to be associated to this container. |
Implemented in bpp::AbstractValuesContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by bpp::Clustal::appendAlignmentFromStream(), bpp::Fasta::appendSequencesFromStream(), and bpp::Mase::appendSequencesFromStream().
|
inlineprotectedinherited |
Definition at line 219 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 203 of file VectorMappedContainer.h.
|
virtual |
Replace a sequence in the container.
name | The name of the 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. |
Implements bpp::SequenceContainer.
Definition at line 556 of file VectorSiteContainer.cpp.
References getSequencePosition(), and bpp::OrderedSequenceContainer::setSequence().
|
inherited |
Replace a sequence in the container.
name | The name of the 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. |
Referenced by setSequence(), bpp::VectorSequenceContainer::setSequence(), and bpp::AlignedSequenceContainer::setSequence().
|
virtual |
Replace a sequence in the container.
sequenceIndex | The position of the 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. |
Implements bpp::OrderedSequenceContainer.
Definition at line 565 of file VectorSiteContainer.cpp.
References bpp::MappedNamedContainer< T >::changeName(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::OrderedSequenceContainer::getComments(), bpp::CoreSequence::getName(), getNumberOfSequences(), getNumberOfSites(), bpp::VectorMappedContainer< T >::getObject(), bpp::VectorMappedContainer< Sequence >::getObjectName(), getSite(), bpp::CoreSymbolList< T >::getValue(), realloc(), bpp::BasicIntSymbolList::setElement(), 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 265 of file VectorSiteContainer.h.
References bpp::VectorMappedContainer< T >::setObjectNames().
Referenced by bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), and bpp::SiteContainerTools::resolveDottedAlignment().
|
virtual |
Set a site in the container.
siteIndex | The position of the site in the container. |
site | The site to set. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Exception | If the specified site does not exists or is not correct. |
Implements bpp::SiteContainer.
Definition at line 283 of file VectorSiteContainer.cpp.
References bpp::VectorPositionedContainer< T >::addObject(), bpp::Site::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::OrderedSequenceContainer::getComments(), getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), getSite(), and bpp::CruxSymbolList::size().
|
virtual |
Set all position attributes of sites.
vPositions | A vector with all site positions. |
Implements bpp::AlignedValuesContainer.
Definition at line 505 of file VectorSiteContainer.cpp.
References getNumberOfSites(), getSite(), and bpp::AbstractCoreSite::setPosition().
|
inlinevirtualinherited |
Reimplemented from bpp::PositionedContainer< T >.
Definition at line 139 of file VectorPositionedContainer.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=().
|
inlinevirtualinherited |
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 106 of file AbstractSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence(), and bpp::CruxSymbolList::toString().
|
inlinevirtualinherited |
Implements bpp::OrderedValuesContainer.
Definition at line 132 of file AbstractSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence(), and bpp::CruxSymbolList::toString().
|
inherited |
|
inlinevirtual |
Element access function.
Allows direct access to the data stored in the container.
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 274 of file VectorSiteContainer.h.
References getNumberOfSites(), and getSequencePosition().
Referenced by getStateValueAt(), and operator()().
|
inlinevirtual |
Element access function.
Allows direct access to the data stored in the container.
sequenceName | The sequence name. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 280 of file VectorSiteContainer.h.
References getNumberOfSites(), and getSequencePosition().
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container.
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 296 of file VectorSiteContainer.h.
References getNumberOfSequences(), and getNumberOfSites().
|
inlinevirtual |
Element access operator.
Allows direct access to the data stored in the container.
sequenceIndex | The sequence position. |
elementIndex | The element position within the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 303 of file VectorSiteContainer.h.
References getNumberOfSequences(), and getNumberOfSites().
|
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.