bpp-seq3
3.0.0
|
The ProbabilisticSiteContainer interface. More...
#include <Bpp/Seq/Container/ProbabilisticSiteContainer.h>
Public Member Functions | |
ProbabilisticSiteContainer () | |
virtual | ~ProbabilisticSiteContainer () |
ProbabilisticSiteContainer * | clone () const =0 |
virtual const std::shared_ptr< ProbabilisticSite > | getSite (size_t siteIndex) const =0 |
Get a site from the container. More... | |
virtual std::shared_ptr< ProbabilisticSite > | getSite (size_t siteIndex)=0 |
const CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) const |
Get a CruxSymbolListSite from a given position. More... | |
CruxSymbolListSite & | getSymbolListSite (size_t siteIndex) |
virtual void | addSite (std::shared_ptr< ProbabilisticSite > site, bool checkPosition=false)=0 |
Add a site at the end of the container. More... | |
virtual void | deleteSites (size_t siteIndex, size_t length)=0 |
Remove a continuous range of sites in the container. More... | |
virtual size_t | getNumberOfSites () const =0 |
Get the number of aligned positions in the container. More... | |
virtual void | reindexSites ()=0 |
Set all positions attributes. More... | |
virtual Vint | getSitePositions () const =0 |
Get all position attributes of sites. More... | |
virtual void | setSitePositions (Vint vPositions)=0 |
Set all position attributes of sites. More... | |
virtual std::string | toString (size_t sequenceIndex) const =0 |
virtual std::string | toString (const std::string &name) const=0 |
Convert a particular sequence to a string. More... | |
virtual std::string | toString (const std::string &name) const =0 |
Convert a particular sequence to a string. More... | |
virtual const std::string & | getName (size_t sequenceIndex) const =0 |
Get the name of a particular row of the alignement (aka sequence). More... | |
virtual size_t | getSequencePosition (const std::string &name) const =0 |
Get the position of a sequence in sequence container from its name. More... | |
virtual double | getStateValueAt (size_t siteIndex, size_t sequenceIndex, int state) const =0 |
virtual double | getStateValueAt (size_t siteIndex, const std::string &sequenceName, int state) const=0 |
get value of a state in a position 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 double | operator() (size_t siteIndex, size_t sequenceIndex, int state) const =0 |
virtual double | operator() (size_t siteIndex, const std::string &sequenceName, int state) const =0 |
virtual const Comments & | getComments (size_t sequenceIndex) const =0 |
virtual const Comments & | getComments (const std::string &name) const=0 |
Get comments of a particular sequence. More... | |
virtual const Comments & | getComments (const std::string &name) const =0 |
Get comments of a particular sequence. More... | |
virtual void | setComments (size_t sequenceIndex, const Comments &comments)=0 |
virtual void | setComments (const std::string &name, const Comments &comments)=0 |
Set the comments of a particular sequence. More... | |
virtual void | setComments (const std::string &name, const Comments &comments)=0 |
Set the comments of a particular sequence. More... | |
virtual const Alphabet * | getAlphabet () const =0 |
Get container's alphabet. More... | |
virtual bool | hasSequence (const std::string &name) const =0 |
Check if a sequence with a given name is present in the container. More... | |
virtual size_t | getNumberOfSequences () const =0 |
Get the number of sequences in the container. More... | |
virtual std::vector< std::string > | getSequenceNames () const =0 |
Get all the names of the sequences in the container. More... | |
virtual void | setSequenceNames (const std::vector< std::string > &names, bool checkNames)=0 |
Set all sequence names. 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... | |
virtual void | clear ()=0 |
Delete all data in the container. More... | |
virtual SequencedValuesContainer * | createEmptyContainer () const =0 |
Return a copy of this container, but with no data inside. More... | |
The ProbabilisticSiteContainer interface.
Container implementing the ProbabilisticSiteContainer interface deal with aligned probabilistic sequences. This interface provides methods to retrieve, add or set sites in the alignment. All site objects are cloned befored being added and retrieved.
Definition at line 61 of file ProbabilisticSiteContainer.h.
|
inline |
Definition at line 65 of file ProbabilisticSiteContainer.h.
|
inlinevirtual |
Definition at line 66 of file ProbabilisticSiteContainer.h.
|
pure virtual |
Add a site at the end of the container.
site | The site to add. |
checkPosition | Look if the position of the new site match a position attribute in the container. |
Implemented in bpp::VectorProbabilisticSiteContainer.
|
pure virtualinherited |
Delete all data in the container.
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
|
pure virtual |
Implements bpp::AlignedValuesContainer.
Implemented in bpp::VectorProbabilisticSiteContainer.
|
pure virtualinherited |
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.
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
|
pure virtualinherited |
Delete the comments associated to this container.
Implemented in bpp::AbstractValuesContainer, and bpp::AbstractProbabilisticSequenceContainer.
|
pure virtualinherited |
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. |
Implemented in bpp::VectorSiteContainer, bpp::VectorProbabilisticSiteContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
Referenced by bpp::SequenceApplicationTools::getSitesToAnalyse(), bpp::SiteContainerTools::removeGapOnlySites(), and bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites().
|
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().
|
pure virtualinherited |
Get comments of a particular sequence.
name | The name of the sequence. |
SequenceNotFoundException | If the name does not match any sequence in the container. |
Implemented in bpp::VectorProbabilisticSequenceContainer, bpp::AbstractSequenceContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by bpp::SequenceContainerTools::getCodonPosition(), and bpp::Mase::writeSequences().
|
inherited |
Get comments of a particular sequence.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
|
pure virtualinherited |
|
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().
|
pure virtualinherited |
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. |
Implemented in bpp::VectorProbabilisticSequenceContainer, bpp::AbstractSequenceContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by bpp::VectorSiteContainer::VectorSiteContainer().
|
pure virtualinherited |
Get the number of sequences in the container.
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
Referenced by bpp::AlignedSequenceContainer::AlignedSequenceContainer(), bpp::SequenceContainerTools::append(), bpp::NexusIOSequence::appendAlignmentFromStream(), bpp::SiteContainerTools::changeGapsToUnknownCharacters(), bpp::SiteContainerTools::changeUnresolvedCharactersToGaps(), bpp::SiteContainerTools::computeSimilarityMatrix(), bpp::SequenceContainerTools::convertAlphabet(), bpp::SequenceContainerTools::getSelectedSequences(), bpp::SiteContainerTools::getSequencePositions(), bpp::SequenceApplicationTools::getSitesToAnalyse(), bpp::SimpleSequenceContainerIterator::hasMoreSequences(), bpp::VectorSequenceContainer::operator=(), bpp::VectorSiteContainer::operator=(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer(), bpp::VectorSequenceContainer::VectorSequenceContainer(), bpp::VectorSiteContainer::VectorSiteContainer(), bpp::Clustal::writeAlignment(), bpp::Phylip::writeAlignment(), bpp::Stockholm::writeAlignment(), bpp::Phylip::writeInterleaved(), and bpp::Phylip::writeSequential().
|
pure virtualinherited |
Get the number of aligned positions in the container.
Implemented in bpp::VectorSiteContainer, bpp::VectorProbabilisticSiteContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
Referenced by bpp::SiteContainerTools::bootstrapSites(), bpp::SiteContainerTools::changeGapsToUnknownCharacters(), bpp::SiteContainerTools::changeUnresolvedCharactersToGaps(), bpp::CompressedVectorSiteContainer::CompressedVectorSiteContainer(), bpp::SequenceApplicationTools::getAlignedContainer(), bpp::SiteContainerTools::getCompleteSites(), bpp::SiteContainerTools::getSequencePositions(), bpp::SequenceApplicationTools::getSitesToAnalyse(), bpp::SiteContainerTools::getSitesWithoutGaps(), bpp::SimpleSiteContainerIterator::hasMoreSites(), bpp::NoGapSiteContainerIterator::hasMoreSites(), bpp::CompleteSiteContainerIterator::hasMoreSites(), bpp::SiteContainerTools::merge(), bpp::AlignedSequenceContainer::operator=(), bpp::CompressedVectorSiteContainer::operator=(), bpp::VectorSiteContainer::operator=(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SiteContainerTools::sampleSites(), bpp::SiteContainerTools::translateSequence(), bpp::VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer(), and bpp::VectorSiteContainer::VectorSiteContainer().
|
pure virtualinherited |
Get all the names of the sequences in the container.
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
Referenced by bpp::SequenceContainerTools::append(), bpp::CompressedVectorSiteContainer::CompressedVectorSiteContainer(), bpp::SiteContainerTools::computeSimilarityMatrix(), bpp::SequenceContainerTools::convertAlphabet(), bpp::SequenceContainerTools::getCodonPosition(), bpp::SiteContainerTools::getCompleteSites(), bpp::SequenceContainerTools::getCounts(), bpp::SequenceContainerTools::getFrequencies(), bpp::SiteContainerTools::getSelectedSites(), bpp::SiteContainerTools::getSitesWithoutGaps(), bpp::SequenceContainerTools::keepOnlySelectedSequences(), bpp::SequenceContainerTools::merge(), bpp::SiteContainerTools::merge(), bpp::VectorSequenceContainer::operator=(), bpp::CompressedVectorSiteContainer::operator=(), bpp::VectorSiteContainer::operator=(), bpp::SiteContainerTools::removeGapOnlySites(), bpp::SiteContainerTools::removeGapOrUnresolvedOnlySites(), bpp::SiteContainerTools::removeGapSites(), bpp::SiteContainerTools::removeStopCodonSites(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SequenceApplicationTools::restrictSelectedSequencesByName(), bpp::SiteContainerTools::sampleSites(), bpp::SequenceContainerTools::sequencesHaveTheSameLength(), bpp::VectorProbabilisticSiteContainer::VectorProbabilisticSiteContainer(), bpp::VectorSequenceContainer::VectorSequenceContainer(), bpp::VectorSiteContainer::VectorSiteContainer(), bpp::Pasta::writeAlignedValues(), bpp::Stockholm::writeAlignment(), bpp::Phylip::writeInterleaved(), bpp::Fasta::writeSequences(), bpp::Mase::writeSequences(), and bpp::Phylip::writeSequential().
|
pure virtualinherited |
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. |
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
Referenced by bpp::AbstractProbabilisticSequenceContainer::setComments(), bpp::AbstractSequenceContainer::setComments(), and bpp::AbstractValuesContainer::setComments().
|
pure virtual |
Get a site from the container.
siteIndex | The position of the site in the container. |
IndexOutOfBoundsException | If the specified site does not exists. |
Implemented in bpp::VectorProbabilisticSiteContainer.
Referenced by bpp::SiteContainerTools::changeGapsToUnknownCharacters(), and getSymbolListSite().
|
pure virtual |
Implemented in bpp::VectorProbabilisticSiteContainer.
|
pure virtualinherited |
Get all position attributes of sites.
Implemented in bpp::VectorSiteContainer, bpp::VectorProbabilisticSiteContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
Referenced by bpp::AlignedSequenceContainer::operator=().
|
pure virtualinherited |
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 |
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
|
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 |
|
pure virtualinherited |
|
inlinevirtual |
Implements bpp::AlignedValuesContainer.
Definition at line 87 of file ProbabilisticSiteContainer.h.
References getSite().
|
inlinevirtual |
Get a CruxSymbolListSite from a given position.
siteIndex | The position |
Implements bpp::AlignedValuesContainer.
Definition at line 82 of file ProbabilisticSiteContainer.h.
References getSite().
|
pure virtualinherited |
Check if a sequence with a given name is present in the container.
name | The name of the sequence. |
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
Referenced by bpp::SequenceContainerTools::getSelectedSequences().
|
pure virtualinherited |
|
pure virtualinherited |
|
pure virtualinherited |
Set all positions attributes.
Implemented in bpp::VectorSiteContainer, bpp::VectorProbabilisticSiteContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
Referenced by bpp::SequenceApplicationTools::getAlignedContainer().
|
inherited |
Set the comments of a particular sequence.
sequenceIndex | The position of the sequence. |
comments | The comments to set to sequence with position 'i'. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
Referenced by bpp::AbstractProbabilisticSequenceContainer::setComments(), bpp::AbstractValuesContainer::setComments(), and bpp::VectorProbabilisticSequenceContainer::setComments().
|
pure virtualinherited |
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. |
Implemented in bpp::VectorProbabilisticSequenceContainer, bpp::AbstractValuesContainer, bpp::AbstractSequenceContainer, and bpp::AbstractProbabilisticSequenceContainer.
|
pure virtualinherited |
|
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().
|
pure virtualinherited |
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. |
Implemented in bpp::VectorSiteContainer, bpp::VectorSequenceContainer, bpp::VectorProbabilisticSiteContainer, bpp::VectorProbabilisticSequenceContainer, and bpp::CompressedVectorSiteContainer.
Referenced by bpp::SequenceContainerTools::createContainerWithSequenceNames(), bpp::SiteContainerTools::getCompleteSites(), and bpp::SiteContainerTools::getSitesWithoutGaps().
|
pure virtualinherited |
Set all position attributes of sites.
vPositions | A vector with all site positions. |
Implemented in bpp::VectorSiteContainer, bpp::VectorProbabilisticSiteContainer, bpp::CompressedVectorSiteContainer, and bpp::AlignedSequenceContainer.
|
pure virtualinherited |
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. |
Implemented in bpp::VectorProbabilisticSequenceContainer, bpp::AbstractSequenceContainer, and bpp::AbstractProbabilisticSequenceContainer.
Referenced by bpp::SequenceContainerTools::convertAlphabet(), bpp::Phylip::writeInterleaved(), bpp::Mase::writeSequences(), and bpp::Phylip::writeSequential().
|
inherited |
Convert a particular sequence to a string.
sequenceIndex | The position of the sequence. |
IndexOutOfBoundsException | If the position does not match any sequence in the container. |
|
pure virtualinherited |