bpp-seq3
3.0.0
|
Aligned sequences container. More...
#include <Bpp/Seq/Container/AlignedSequenceContainer.h>
Public Member Functions | |
AlignedSequenceContainer (std::vector< std::shared_ptr< Sequence >> vseq, const Alphabet *alpha) | |
Build a container with the specified alphabet, with shared Sequences. More... | |
AlignedSequenceContainer (const Alphabet *alpha) | |
Build a new empty container with the specified alphabet. More... | |
AlignedSequenceContainer (const AlignedSequenceContainer &asc) | |
Copy constructor. More... | |
AlignedSequenceContainer (const SiteContainer &sc) | |
Convert any SiteContainer object into a AlignedSequenceContainer object. More... | |
AlignedSequenceContainer (const OrderedSequenceContainer &osc) | |
Try to coerce an OrderedSequenceContainer object into an AlignedSequenceContainer object. More... | |
AlignedSequenceContainer & | operator= (const AlignedSequenceContainer &asc) |
AlignedSequenceContainer & | operator= (const SiteContainer &sc) |
AlignedSequenceContainer & | operator= (const OrderedSequenceContainer &osc) |
virtual | ~AlignedSequenceContainer () |
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 double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const=0 |
get value of a state in a position 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... | |
virtual const Alphabet * | getAlphabet () const =0 |
Get container's alphabet. 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 |
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... | |
size_t | getSize () const |
the size More... | |
bool | isAvailablePosition (size_t objectIndex) const |
void | setSize (size_t size) |
void | nullify () |
Nullify all elements. More... | |
The Clonable interface. | |
AlignedSequenceContainer * | clone () const |
The SiteContainer interface implementation: | |
virtual const Site & | getSite (size_t siteIndex) const |
Get a site from the container. More... | |
virtual Site & | getSite (size_t siteIndex) |
const CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) const |
Get a CruxSymbolListSite from a given position. More... | |
CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) |
virtual 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... | |
void | clear () |
AlignedSequenceContainer * | createEmptyContainer () const |
Return a copy of this container, but with no data inside. 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... | |
Vint | getSitePositions () const |
Get all position attributes of sites. More... | |
void | setSitePositions (Vint vPositions) |
Set all position attributes of sites. More... | |
void | reindexSites () |
Set all positions attributes. More... | |
Redefinition of VectorSequenceContainer methods, to check for sequence lengths. | |
void | setSequence (const std::string &name, const Sequence &sequence, bool checkName=true) |
Replace a sequence in the container. More... | |
void | setSequence (size_t sequenceIndex, const Sequence &sequence, bool checkName=true) |
Replace a sequence in the container. More... | |
void | addSequence (const Sequence &sequence, bool checkName=true) |
Add a sequence at the end of the container. More... | |
void | addSequence (const Sequence &sequence, size_t sequenceIndex, bool checkName=true) |
Add a sequence to the container at a particular position. More... | |
The SequenceContainer interface. | |
bool | hasSequence (const std::string &name) const |
check if there is a Sequence with this name in the map (same as hasSequenceByKey). More... | |
bool | hasSequenceByName (const std::string &name) const |
bool | hasSequenceByKey (const std::string &name) const |
check if there is a Sequence with this key in the map. More... | |
const Sequence & | getSequence (const std::string &name) const |
get the Sequence with this name in the map (same as getSequenceByKey). More... | |
const Sequence & | getSequenceByName (const std::string &name) const |
const Sequence & | getSequenceByKey (const std::string &name) const |
check if there is a Sequence with this key in the map. More... | |
std::shared_ptr< Sequence > | removeSequence (const std::string &name) |
get the Sequence with this name in the map (same as removeSequenceByKey). More... | |
std::shared_ptr< Sequence > | removeSequenceByKey (const std::string &name) |
remove & return a Sequence with this key from the map. More... | |
std::shared_ptr< Sequence > | removeSequenceByName (const std::string &name) |
remove & return a Sequence with this name. More... | |
void | deleteSequence (const std::string &name) |
delete the Sequence with this name in the map (same as deleteSequenceByKey). More... | |
void | deleteSequence (size_t pos) |
void | deleteSequenceByKey (const std::string &name) |
remove & return a Sequence with this key from the map. More... | |
void | deleteSequenceByName (const std::string &name) |
remove & return a Sequence with this name. More... | |
std::vector< std::string > | getKeys () const |
size_t | getNumberOfSequences () const |
Get the number of sequences in the container. More... | |
std::vector< std::string > | getSequenceNames () const |
get Sequences proper names (may be different from the keys used to store them in the map), in the order of the vector. More... | |
std::vector< std::string > | getSequenceKeys () const |
get Sequences keys (ie the strings used to store them in the map, may be different from their proper names), in the order of the vector. More... | |
void | setSequenceNames (const std::vector< std::string > &names, bool checkNames=true) |
set the proper names of the Sequences, in the order of the vector. More... | |
int & | valueAt (const std::string &sequenceName, size_t elementIndex) |
Get the value of an element, given sequenceName in the map and the elementIndex position. More... | |
const int & | valueAt (const std::string &key, size_t elementIndex) const |
Get the value at a Position in a Sequence with given sequenceName in the map (may be not the actual name of the Sequence.. 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() (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 & | 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... | |
The OrderedSequenceContainer interface. | |
const Sequence & | getSequence (size_t sequenceIndex) const |
Retrieve a sequence object from the container. More... | |
std::shared_ptr< Sequence > | removeSequence (size_t sequenceIndex) |
Extract (and remove) a sequence from the container. More... | |
size_t | getSequencePosition (const std::string &name) const |
Get the position of a sequence in sequence container from its name. More... | |
void | setComments (size_t sequenceIndex, const Comments &comments) |
SequenceContainer methods. | |
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... | |
virtual void | setComments (size_t sequenceIndex, const Comments &comments)=0 |
virtual std::string | toString (size_t sequenceIndex) const=0 |
virtual const Comments & | getComments (size_t sequenceIndex) const=0 |
Add sequence to this container. | |
virtual void | addSequence (const Sequence &sequence, const std::string &key) |
Add a sequence with a given key at the end of the container. More... | |
virtual void | addSequence (const std::shared_ptr< Sequence > sequence, bool checkName=true) |
Add a sequence at the end of the container. More... | |
virtual void | addSequence (const Sequence &sequence, size_t sequenceIndex, const std::string &key) |
Add a sequence to the container at a particular position with a given key. More... | |
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... | |
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 | |
bool | checkSize_ (const Sequence &sequence) |
Check sequence's size before insertion in sequence container. More... | |
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 |
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 |
SequencedValuesContainer methods. | |
double | operator() (size_t siteIndex, const std::string &sequenceName, int state) const |
double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const |
get Value at given state with given key in the Sequence Map More... | |
OrderedValuesContainer methods. | |
double | operator() (size_t siteIndex, size_t sequenceIndex, int state) const |
double | getStateValueAt (size_t siteIndex, size_t sequenceIndex, int state) const |
AbstractSequenceContainer methods. | |
Sequence & | getSequence_ (size_t i) |
Sequence & | getSequence_ (const std::string &key) |
getSequence with given key More... | |
Protected Attributes | |
const Alphabet * | alphabet_ |
The container's alphabet. More... | |
Comments | comments_ |
Private Member Functions | |
virtual void | setSize (size_t size) |
Private Attributes | |
std::vector< int > | positions_ |
size_t | length_ |
std::vector< std::string > | vNames_ |
std::map< std::string, size_t > | mNames_ |
std::map< std::string, std::shared_ptr< T > > | mObjects_ |
Aligned sequences container.
This class inherits from the VectorSequenceContainer and add site access. Sequence addition methods are re-defined to check for sequence lengths. Sequence access is in , and site access in , where is the number of sequences in the container.
Sites are built on the fly when needed, otherwise they are only nullptr
See VectorSiteContainer for an alternative implementation.
Definition at line 72 of file AlignedSequenceContainer.h.
AlignedSequenceContainer::AlignedSequenceContainer | ( | std::vector< std::shared_ptr< Sequence >> | vseq, |
const Alphabet * | alpha | ||
) |
Build a container with the specified alphabet, with shared Sequences.
vseq | the vector of shared_ptr<Sequence> that will be copied. |
alpha | The alphabet to use. |
Definition at line 55 of file AlignedSequenceContainer.cpp.
References checkSize_(), length_, reindexSites(), and bpp::VectorPositionedContainer< T >::setSize().
Referenced by clone(), and createEmptyContainer().
|
inline |
Build a new empty container with the specified alphabet.
alpha | The alphabet to use. |
Definition at line 98 of file AlignedSequenceContainer.h.
References reindexSites().
|
inline |
Copy constructor.
asc | The container to copy. |
Definition at line 113 of file AlignedSequenceContainer.h.
|
inline |
Convert any SiteContainer object into a AlignedSequenceContainer object.
sc | The container to copy. |
Definition at line 127 of file AlignedSequenceContainer.h.
AlignedSequenceContainer::AlignedSequenceContainer | ( | const OrderedSequenceContainer & | osc | ) |
Try to coerce an OrderedSequenceContainer object into an AlignedSequenceContainer object.
Sequences in osc will be considered alligned, and have the same number of sites.
osc | The ordered container to coerce. |
SequenceNotAlignedException | If sequences in osc do not have the same length. |
Definition at line 74 of file AlignedSequenceContainer.cpp.
References addSequence(), bpp::SequencedValuesContainer::getGeneralComments(), bpp::SequencedValuesContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), length_, reindexSites(), bpp::AbstractValuesContainer::setGeneralComments(), bpp::VectorPositionedContainer< T >::setSize(), and bpp::CruxSymbolList::size().
|
inlinevirtual |
Definition at line 149 of file AlignedSequenceContainer.h.
|
inlineprotectedinherited |
Definition at line 226 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Add an object.
object | The object to add. |
objectIndex | The new position of the object |
checkPosition | Look if the position is empty. |
Definition at line 192 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Set a object.
name | The key of the object. |
object | The new object that will be associated to the key. |
checkName | Tell is the object name must be checked. |
Definition at line 140 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), and bpp::MappedNamedContainer< T >::mObjects_.
Referenced by bpp::VectorMappedContainer< T >::addObject(), bpp::VectorMappedContainer< T >::appendObject(), and bpp::VectorMappedContainer< T >::insertObject().
|
inlineprotectedinherited |
Add an object.
object | The object to add. |
objectIndex | The new position of the object |
checkPosition | Look if the position is empty. |
Definition at line 192 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::getSize(), and bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::VectorMappedContainer< T >::addObject(), getSite(), bpp::CompressedVectorSiteContainer::setSite(), and bpp::VectorSiteContainer::setSite().
|
protectedpure virtualinherited |
Implemented in bpp::VectorMappedContainer< T >.
|
inlineprotectedinherited |
Definition at line 298 of file VectorMappedContainer.h.
|
inlineprotectedinherited |
Definition at line 258 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 234 of file MappedNamedContainer.h.
References bpp::MappedNamedContainer< T >::hasObject(), and bpp::MappedNamedContainer< T >::mObjects_.
Referenced by bpp::VectorMappedContainer< T >::addObject_().
|
inlineprotectedinherited |
Definition at line 258 of file VectorPositionedContainer.h.
References bpp::VectorPositionedContainer< T >::positions_.
Referenced by bpp::VectorMappedContainer< T >::addObject_(), and getSite().
|
virtual |
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. |
Reimplemented from bpp::VectorSequenceContainer.
Definition at line 481 of file AlignedSequenceContainer.cpp.
References bpp::VectorSequenceContainer::addSequence(), checkSize_(), length_, reindexSites(), bpp::VectorPositionedContainer< T >::setSize(), and bpp::CruxSymbolList::size().
Referenced by AlignedSequenceContainer(), and bpp::SiteContainerTools::alignNW().
|
inlinevirtualinherited |
Add a sequence with a given key 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. |
key | the key in the map |
Definition at line 463 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::appendObject(), bpp::Sequence::clone(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), and bpp::Alphabet::getAlphabetType().
|
virtual |
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. |
Reimplemented from bpp::VectorSequenceContainer.
Definition at line 498 of file AlignedSequenceContainer.cpp.
References bpp::VectorSequenceContainer::addSequence(), checkSize_(), bpp::VectorSequenceContainer::getNumberOfSequences(), length_, bpp::VectorPositionedContainer< T >::nullify(), bpp::VectorPositionedContainer< T >::setSize(), and bpp::CruxSymbolList::size().
|
inlinevirtualinherited |
Add a sequence to the container at a particular position with a given key.
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. |
key | the key in the map |
sequenceIndex | The position where to insert the new sequence. All the following sequences will be pushed. |
Exception | If the sequence couldn't be added to the container. |
Definition at line 531 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::addObject(), and bpp::Sequence::clone().
|
inlinevirtualinherited |
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 486 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::appendObject(), and bpp::AbstractValuesContainer::getAlphabet().
|
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 281 of file AlignedSequenceContainer.cpp.
References bpp::CoreSymbolList< T >::addElement(), bpp::VectorPositionedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::VectorSequenceContainer::getNumberOfSequences(), bpp::AbstractCoreSite::getPosition(), bpp::VectorSequenceContainer::getSequence_(), length_, positions_, and bpp::CruxSymbolList::size().
|
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 316 of file AlignedSequenceContainer.cpp.
References bpp::CoreSymbolList< T >::addElement(), bpp::VectorPositionedContainer< T >::appendObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::VectorSequenceContainer::getNumberOfSequences(), bpp::VectorSequenceContainer::getSequence_(), length_, positions_, and bpp::CruxSymbolList::size().
|
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 352 of file AlignedSequenceContainer.cpp.
References bpp::CoreSymbolList< T >::addElement(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), bpp::VectorSequenceContainer::getSequence_(), bpp::VectorPositionedContainer< T >::insertObject(), length_, positions_, and bpp::CruxSymbolList::size().
|
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 390 of file AlignedSequenceContainer.cpp.
References bpp::CoreSymbolList< T >::addElement(), bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorSequenceContainer::getSequence_(), bpp::VectorPositionedContainer< T >::insertObject(), length_, positions_, and bpp::CruxSymbolList::size().
|
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(), 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().
|
inlineprotected |
Check sequence's size before insertion in sequence container.
sequence | The sequence to check. |
Definition at line 237 of file AlignedSequenceContainer.h.
References length_, and bpp::CruxSymbolList::size().
Referenced by addSequence(), AlignedSequenceContainer(), and setSequence().
|
virtual |
Implements bpp::PositionedContainer< T >.
Definition at line 519 of file AlignedSequenceContainer.cpp.
References bpp::VectorPositionedContainer< T >::clear(), bpp::VectorSequenceContainer::clear(), and length_.
|
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 157 of file AlignedSequenceContainer.h.
References AlignedSequenceContainer().
|
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 528 of file AlignedSequenceContainer.cpp.
References AlignedSequenceContainer(), bpp::AbstractValuesContainer::getAlphabet(), bpp::AbstractValuesContainer::getGeneralComments(), and bpp::AbstractValuesContainer::setGeneralComments().
|
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 deleteSites(), bpp::VectorProbabilisticSiteContainer::deleteSites(), and bpp::VectorSiteContainer::deleteSites().
|
inlineinherited |
delete the Sequence with this name in the map (same as deleteSequenceByKey).
Definition at line 268 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::deleteSequenceByKey().
Referenced by bpp::VectorSequenceContainer::deleteSequenceByKey(), and bpp::VectorSequenceContainer::deleteSequenceByName().
|
inlineinherited |
Definition at line 273 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::deleteObject().
|
inlineinherited |
remove & return a Sequence with this key from the map.
Definition at line 283 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::deleteSequence(), and bpp::VectorSequenceContainer::getSequencePosition().
Referenced by bpp::VectorSequenceContainer::deleteSequence().
|
inherited |
remove & return a Sequence with this name.
Definition at line 190 of file VectorSequenceContainer.cpp.
References bpp::VectorSequenceContainer::deleteSequence(), bpp::CoreSequence::getName(), bpp::OrderedSequenceContainer::getSequence(), and bpp::VectorMappedContainer< Sequence >::getSize().
|
virtual |
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 238 of file AlignedSequenceContainer.cpp.
References bpp::CruxSymbolList::deleteElement(), bpp::VectorPositionedContainer< T >::deleteObject(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorSequenceContainer::getSequence_(), length_, and positions_.
|
virtual |
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 259 of file AlignedSequenceContainer.cpp.
References bpp::CruxSymbolList::deleteElements(), bpp::VectorPositionedContainer< T >::deleteObjects(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorSequenceContainer::getSequence_(), length_, and positions_.
|
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(), bpp::VectorSiteContainer::addSequence(), bpp::CompressedVectorSiteContainer::addSite(), addSite(), bpp::VectorSiteContainer::addSite(), bpp::VectorProbabilisticSiteContainer::addSite(), bpp::Pasta::appendSequencesFromStream(), createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorProbabilisticSiteContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::VectorSiteContainer::createEmptyContainer(), bpp::CompressedVectorSiteContainer::getSequence(), bpp::VectorSiteContainer::getSequence(), bpp::VectorProbabilisticSiteContainer::getSequence(), getSite(), bpp::CompressedVectorSiteContainer::getStateValueAt(), bpp::VectorProbabilisticSiteContainer::getStateValueAt(), bpp::VectorSiteContainer::getStateValueAt(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::CompressedVectorSiteContainer::operator()(), bpp::VectorProbabilisticSiteContainer::operator()(), bpp::VectorSiteContainer::operator()(), bpp::VectorProbabilisticSequenceContainer::operator()(), bpp::VectorSequenceContainer::operator()(), bpp::VectorProbabilisticSiteContainer::realloc(), bpp::VectorSiteContainer::realloc(), bpp::CompressedVectorSiteContainer::removeSite(), bpp::CompressedVectorSiteContainer::setComments(), bpp::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorProbabilisticSequenceContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::VectorSequenceContainer::setSequence(), setSite(), bpp::CompressedVectorSiteContainer::setSite(), and bpp::VectorSiteContainer::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 |
Referenced by bpp::CompressedVectorSiteContainer::addSite(), bpp::VectorSiteContainer::addSite(), bpp::VectorSiteContainer::getSequence(), bpp::CompressedVectorSiteContainer::removeSite(), bpp::VectorSiteContainer::setSequence(), bpp::CompressedVectorSiteContainer::setSite(), and bpp::VectorSiteContainer::setSite().
|
inlinevirtualinherited |
Get the comments of this container.
Implements bpp::SequencedValuesContainer.
Definition at line 101 of file AbstractValuesContainer.h.
References bpp::Commentable::getComments().
Referenced by createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), and bpp::VectorSiteContainer::createEmptyContainer().
|
pure virtualinherited |
Get the comments of this container.
Implemented in bpp::AbstractValuesContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by 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().
|
inlineinherited |
Definition at line 297 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObjectNames().
|
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.
|
inlinevirtualinherited |
Get the number of sequences in the container.
Implements bpp::SequencedValuesContainer.
Definition at line 299 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getSize().
Referenced by addSequence(), addSite(), deleteSite(), deleteSites(), getSite(), bpp::VectorSequenceContainer::getStateValueAt(), removeSite(), setSequence(), bpp::VectorSequenceContainer::setSequenceNames(), setSite(), and bpp::VectorSequenceContainer::VectorSequenceContainer().
|
inlinevirtual |
Get the number of aligned positions in the container.
Implements bpp::AlignedValuesContainer.
Definition at line 209 of file AlignedSequenceContainer.h.
References length_.
Referenced by addSite(), deleteSite(), deleteSites(), getSite(), operator=(), removeSite(), setSite(), and setSitePositions().
|
inlineprotectedvirtualinherited |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 188 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Get a object.
name | The key of the object to retrieve. |
Reimplemented from bpp::MappedNamedContainer< T >.
Definition at line 183 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 172 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Implements bpp::PositionedContainer< T >.
Definition at line 177 of file VectorPositionedContainer.h.
|
inlineprotectedvirtualinherited |
Retrieve an object from the container. Set as protected since they will be public under T specific names.
objectIndex | The position of the object. |
Reimplemented from bpp::VectorPositionedContainer< T >.
Definition at line 167 of file VectorMappedContainer.h.
|
inlineprotectedvirtualinherited |
Retrieve an object from the container. Set as protected since they will be public under T specific names.
objectIndex | The position of the object. |
Implements bpp::PositionedContainer< T >.
Definition at line 170 of file VectorPositionedContainer.h.
|
inlineprotectedinherited |
Definition at line 251 of file VectorPositionedContainer.h.
|
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.
|
inlinevirtualinherited |
get the Sequence with this name in the map (same as getSequenceByKey).
Implements bpp::SequenceContainer.
Definition at line 207 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequenceByKey().
Referenced by bpp::VectorSequenceContainer::VectorSequenceContainer().
|
inherited |
Retrieve a sequence object from the container.
name | The name of the sequence. |
Referenced by AlignedSequenceContainer(), bpp::VectorSequenceContainer::deleteSequenceByName(), bpp::AbstractSequenceContainer::getComments(), bpp::AbstractSequenceContainer::getName(), bpp::CompressedVectorSiteContainer::getSequence(), bpp::VectorSiteContainer::getSequence(), bpp::VectorSequenceContainer::getSequenceByName(), bpp::VectorSequenceContainer::getSequenceNames(), getSite(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::hasSequenceByName(), bpp::VectorSequenceContainer::operator()(), bpp::VectorSiteContainer::removeSequence(), bpp::VectorSequenceContainer::removeSequenceByName(), bpp::AbstractSequenceContainer::toString(), and bpp::VectorSequenceContainer::valueAt().
|
inlinevirtualinherited |
Retrieve a sequence object from the container.
sequenceIndex | The position of the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 397 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObject().
|
inlineprotectedinherited |
getSequence with given key
Definition at line 553 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObject().
|
inlineprotectedinherited |
Definition at line 542 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObject().
Referenced by addSite(), deleteSite(), deleteSites(), bpp::VectorSequenceContainer::operator()(), removeSite(), bpp::VectorSequenceContainer::setComments(), bpp::VectorSequenceContainer::setSequenceNames(), setSite(), and bpp::VectorSequenceContainer::valueAt().
|
inlineinherited |
check if there is a Sequence with this key in the map.
Definition at line 219 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObject().
Referenced by bpp::VectorSequenceContainer::getSequence(), and bpp::VectorSequenceContainer::valueAt().
|
inherited |
Definition at line 156 of file VectorSequenceContainer.cpp.
References bpp::CoreSequence::getName(), bpp::OrderedSequenceContainer::getSequence(), and bpp::VectorMappedContainer< Sequence >::getSize().
|
inlineinherited |
get Sequences keys (ie the strings used to store them in the map, may be different from their proper names), in the order of the vector.
Definition at line 316 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObjectNames().
|
virtualinherited |
get Sequences proper names (may be different from the keys used to store them in the map), in the order of the vector.
Implements bpp::SequencedValuesContainer.
Definition at line 168 of file VectorSequenceContainer.cpp.
References bpp::AbstractSequenceContainer::getName(), bpp::OrderedSequenceContainer::getSequence(), and bpp::VectorMappedContainer< Sequence >::getSize().
|
inlinevirtualinherited |
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 392 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::getObjectPosition().
Referenced by bpp::VectorSequenceContainer::deleteSequenceByKey(), bpp::VectorSequenceContainer::removeSequenceByKey(), and bpp::VectorSequenceContainer::setSequence().
|
virtual |
Implements bpp::SiteContainer.
Definition at line 160 of file AlignedSequenceContainer.cpp.
References bpp::VectorPositionedContainer< T >::addObject(), bpp::AbstractValuesContainer::getAlphabet(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorPositionedContainer< T >::getObject(), bpp::OrderedSequenceContainer::getSequence(), and length_.
|
virtual |
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 142 of file AlignedSequenceContainer.cpp.
References bpp::VectorPositionedContainer< T >::addObject_(), bpp::AbstractValuesContainer::getAlphabet(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorPositionedContainer< T >::getObject(), bpp::OrderedSequenceContainer::getSequence(), and length_.
Referenced by getSymbolListSite(), and removeSite().
|
inlinevirtual |
Get all position attributes of sites.
Implements bpp::AlignedValuesContainer.
Definition at line 210 of file AlignedSequenceContainer.h.
References positions_.
Referenced by operator=().
|
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.
|
inlineprotectedvirtualinherited |
get Value at given state with given key in the Sequence Map
Implements bpp::SequencedValuesContainer.
Definition at line 571 of file VectorSequenceContainer.h.
References bpp::OrderedSequenceContainer::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 |
|
inlineprotectedvirtualinherited |
Implements bpp::OrderedValuesContainer.
Definition at line 592 of file VectorSequenceContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::VectorSequenceContainer::getNumberOfSequences(), bpp::OrderedSequenceContainer::getSequence(), bpp::Alphabet::isResolvedIn(), and bpp::CruxSymbolList::size().
|
inlinevirtual |
Implements bpp::SiteContainer.
Definition at line 182 of file AlignedSequenceContainer.h.
References getSite().
|
inlinevirtual |
Get a CruxSymbolListSite from a given position.
siteIndex | The position |
Implements bpp::SiteContainer.
Definition at line 177 of file AlignedSequenceContainer.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.
|
inlinevirtualinherited |
check if there is a Sequence with this name in the map (same as hasSequenceByKey).
Implements bpp::SequencedValuesContainer.
Definition at line 184 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::hasSequenceByKey().
|
inlineinherited |
check if there is a Sequence with this key in the map.
Definition at line 196 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::hasObject().
Referenced by bpp::VectorSequenceContainer::hasSequence().
|
inherited |
Definition at line 147 of file VectorSequenceContainer.cpp.
References bpp::AbstractSequenceContainer::getName(), bpp::OrderedSequenceContainer::getSequence(), and bpp::VectorMappedContainer< Sequence >::getSize().
|
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 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.
|
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 addSequence(), bpp::VectorSiteContainer::addSite(), bpp::VectorProbabilisticSiteContainer::addSite(), and setSequence().
|
inlinevirtualinherited |
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 354 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequence_().
|
inlinevirtualinherited |
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 359 of file VectorSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence().
|
inlinevirtualinherited |
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 374 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequence_().
|
inlinevirtualinherited |
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 378 of file VectorSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence().
|
inlineprotectedvirtualinherited |
Implements bpp::SequencedValuesContainer.
Definition at line 576 of file VectorSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence().
|
inlineprotectedvirtualinherited |
Implements bpp::OrderedValuesContainer.
Definition at line 603 of file VectorSequenceContainer.h.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::OrderedSequenceContainer::getSequence(), and bpp::Alphabet::isResolvedIn().
AlignedSequenceContainer & AlignedSequenceContainer::operator= | ( | const AlignedSequenceContainer & | asc | ) |
Definition at line 100 of file AlignedSequenceContainer.cpp.
References getNumberOfSites(), getSitePositions(), length_, bpp::VectorPositionedContainer< T >::operator=(), bpp::VectorSequenceContainer::operator=(), and positions_.
AlignedSequenceContainer & AlignedSequenceContainer::operator= | ( | const OrderedSequenceContainer & | osc | ) |
Definition at line 128 of file AlignedSequenceContainer.cpp.
References length_, bpp::VectorSequenceContainer::operator=(), reindexSites(), and bpp::VectorPositionedContainer< T >::setSize().
AlignedSequenceContainer & AlignedSequenceContainer::operator= | ( | const SiteContainer & | sc | ) |
|
virtual |
Set all positions attributes.
Implements bpp::AlignedValuesContainer.
Definition at line 427 of file AlignedSequenceContainer.cpp.
References length_, and positions_.
Referenced by addSequence(), AlignedSequenceContainer(), and 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.
|
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.
|
inlinevirtualinherited |
get the Sequence with this name in the map (same as removeSequenceByKey).
Implements bpp::SequenceContainer.
Definition at line 240 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::removeSequenceByKey().
|
inherited |
Extract (and remove) a sequence from the container.
name | The name of the sequence. |
Referenced by bpp::VectorSiteContainer::removeSequence(), bpp::VectorSequenceContainer::removeSequenceByKey(), and bpp::VectorSequenceContainer::removeSequenceByName().
|
inlinevirtualinherited |
Extract (and remove) a sequence from the container.
sequenceIndex | The position of the sequence. |
Implements bpp::OrderedSequenceContainer.
Definition at line 410 of file VectorSequenceContainer.h.
References bpp::VectorMappedContainer< Sequence >::removeObject().
|
inlineinherited |
remove & return a Sequence with this key from the map.
Definition at line 250 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequencePosition(), and bpp::OrderedSequenceContainer::removeSequence().
Referenced by bpp::VectorSequenceContainer::removeSequence().
|
inherited |
remove & return a Sequence with this name.
Definition at line 178 of file VectorSequenceContainer.cpp.
References bpp::CoreSequence::getName(), bpp::OrderedSequenceContainer::getSequence(), bpp::VectorMappedContainer< Sequence >::getSize(), and bpp::OrderedSequenceContainer::removeSequence().
|
virtual |
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 214 of file AlignedSequenceContainer.cpp.
References bpp::CruxSymbolList::deleteElement(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::VectorSequenceContainer::getSequence_(), getSite(), length_, positions_, and 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().
|
inlinevirtualinherited |
Implements bpp::AbstractSequenceContainer.
Definition at line 415 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequence_(), and bpp::CoreSequence::setComments().
|
inherited |
Referenced by bpp::AbstractSequenceContainer::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 AlignedSequenceContainer(), createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::VectorProbabilisticSequenceContainer::createEmptyContainer(), bpp::VectorSequenceContainer::createEmptyContainer(), bpp::VectorSiteContainer::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.
|
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 bpp::VectorSiteContainer::setSequence(), bpp::VectorSequenceContainer::setSequence(), and setSequence().
|
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 468 of file AlignedSequenceContainer.cpp.
References checkSize_(), bpp::VectorSequenceContainer::getNumberOfSequences(), length_, bpp::OrderedSequenceContainer::setSequence(), and bpp::CruxSymbolList::size().
|
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 450 of file AlignedSequenceContainer.cpp.
References checkSize_(), bpp::VectorSequenceContainer::getNumberOfSequences(), length_, bpp::VectorPositionedContainer< T >::nullify(), bpp::OrderedSequenceContainer::setSequence(), and bpp::CruxSymbolList::size().
|
virtualinherited |
set the proper names of the Sequences, in the order of the vector.
Implements bpp::SequencedValuesContainer.
Definition at line 205 of file VectorSequenceContainer.cpp.
References bpp::VectorSequenceContainer::getNumberOfSequences(), bpp::VectorSequenceContainer::getSequence_(), bpp::CoreSequence::setName(), and bpp::VectorMappedContainer< Sequence >::setObjectNames().
|
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 182 of file AlignedSequenceContainer.cpp.
References bpp::AbstractValuesContainer::getAlphabet(), bpp::CruxSymbolList::getAlphabet(), bpp::Alphabet::getAlphabetType(), bpp::VectorSequenceContainer::getNumberOfSequences(), getNumberOfSites(), bpp::AbstractCoreSite::getPosition(), bpp::VectorSequenceContainer::getSequence_(), positions_, bpp::CoreSymbolList< T >::setElement(), and bpp::CruxSymbolList::size().
|
virtual |
Set all position attributes of sites.
vPositions | A vector with all site positions. |
Implements bpp::AlignedValuesContainer.
Definition at line 436 of file AlignedSequenceContainer.cpp.
References getNumberOfSites(), and positions_.
|
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(), addSequence(), AlignedSequenceContainer(), and operator=().
|
inlinevirtualinherited |
Reimplemented from bpp::PositionedContainer< T >.
Definition at line 139 of file VectorPositionedContainer.h.
|
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 |
|
inlinevirtualinherited |
Get the value at a Position in a Sequence with given sequenceName in the map (may be not the actual name of the Sequence..
Implements bpp::OrderedSequenceContainer.
Definition at line 349 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequenceByKey().
|
inlinevirtualinherited |
Get the value of an element, given sequenceName in the map and the elementIndex position.
Implements bpp::OrderedSequenceContainer.
Definition at line 337 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequence_().
|
inlinevirtualinherited |
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 364 of file VectorSequenceContainer.h.
References bpp::VectorSequenceContainer::getSequence_().
|
inlinevirtualinherited |
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 369 of file VectorSequenceContainer.h.
References bpp::OrderedSequenceContainer::getSequence().
|
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().
|
private |
Definition at line 81 of file AlignedSequenceContainer.h.
Referenced by addSequence(), addSite(), AlignedSequenceContainer(), checkSize_(), clear(), deleteSite(), deleteSites(), getNumberOfSites(), getSite(), operator=(), reindexSites(), removeSite(), and setSequence().
|
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().
|
private |
Definition at line 79 of file AlignedSequenceContainer.h.
Referenced by addSite(), deleteSite(), deleteSites(), getSitePositions(), operator=(), reindexSites(), removeSite(), setSite(), and setSitePositions().
|
privateinherited |
Definition at line 79 of file VectorMappedContainer.h.