bpp-seq3
3.0.0
|
The Container of Aligned Values interface. More...
#include <Bpp/Seq/Container/AlignmentData.h>
Public Member Functions | |
TemplateAlignmentDataInterface () | |
virtual | ~TemplateAlignmentDataInterface () |
TemplateAlignmentDataInterface * | clone () const override=0 |
virtual const CoreSiteInterface & | site (size_t siteIndex) const =0 |
Get a site from a given position. 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 | getSiteCoordinates () const =0 |
Get all coordinates of sites. More... | |
virtual void | setSiteCoordinates (const Vint &vCoordinates)=0 |
Set all coordinates of sites. More... | |
virtual const Alphabet & | alphabet () const=0 |
Get the container's alphabet. More... | |
virtual std::shared_ptr< const Alphabet > | getAlphabet () const=0 |
Get a pointer toward the container's alphabet. More... | |
virtual size_t | getNumberOfSequences () const=0 |
Get the number of sequences in the container. More... | |
virtual std::vector< std::string > | getSequenceKeys () const=0 |
virtual void | setSequenceKeys (const std::vector< std::string > &sequenceKeys)=0 |
Reset all sequence keys. More... | |
virtual double | getStateValueAt (size_t sitePosition, const std::string &sequenceKey, int state) const=0 |
Get the value of a state at a given position. More... | |
virtual double | getStateValueAt (size_t sitePosition, size_t sequencePosition, int state) const=0 |
Get value of a state at a given position. More... | |
virtual double | operator() (size_t sitePosition, const std::string &sequenceKey, int state) const=0 |
Get the value of a state at a given position. More... | |
virtual double | operator() (size_t sitePosition, size_t sequencePosition, int state) const=0 |
Get the value of a state at a given position. More... | |
virtual void | clear ()=0 |
Delete all data in the container. More... | |
virtual TemplateSequenceDataInterface< std::string > * | createEmptyContainer () const=0 |
Return a copy of this container, but with no data inside. More... | |
virtual bool | hasSequence (const std::string &sequenceKey) const=0 |
Check if a certain key is associated to a sequence in the container. More... | |
virtual const Comments & | getComments () const =0 |
Get the comments. More... | |
virtual void | setComments (const Comments &comments)=0 |
Set the comments. More... | |
virtual void | clearComments ()=0 |
Access by key | |
virtual const CoreSequenceInterface & | sequence (const std::string &sequenceKey) const=0 |
Retrieve a sequence object from the container. More... | |
virtual void | deleteSequence (const std::string &sequenceKey)=0 |
Remove and delete a sequence from the container. More... | |
Access by position | |
virtual const CoreSequenceInterface & | sequence (size_t sequencePosition) const=0 |
Retrieve a sequence object from the container. More... | |
virtual void | deleteSequence (size_t sequencePosition)=0 |
Remove and delete a sequence from the container. More... | |
Index management | |
Position to key and key to position. | |
virtual const std::string & | sequenceKey (size_t sequencePosition) const=0 |
Get the key associated to a given sequence. More... | |
virtual size_t | getSequencePosition (const std::string &sequenceKey) const=0 |
Get the position of a sequence with a given key in the container. More... | |
Access sequence names | |
virtual std::vector< std::string > | getSequenceNames () const=0 |
virtual void | setSequenceNames (const std::vector< std::string > &names, bool updateKeys)=0 |
Batch-set all sequence names. More... | |
virtual std::vector< Comments > | getSequenceComments () const=0 |
The Container of Aligned Values interface.
Container implementing the AlignedValuesContainer interface deal with aligned data.
Definition at line 24 of file AlignmentData.h.
|
inline |
Definition at line 28 of file AlignmentData.h.
|
inlinevirtual |
Definition at line 29 of file AlignmentData.h.
|
pure virtualinherited |
Get the container's alphabet.
Implemented in bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >, bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >, and bpp::AbstractTemplateSequenceContainer< Sequence, std::string >.
|
pure virtualinherited |
Delete all data in the container.
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Implemented in bpp::SimpleCommentable.
|
overridepure virtual |
Implements bpp::TemplateSequenceDataInterface< std::string >.
Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, HashType >, bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Return a copy of this container, but with no data inside.
This method creates a new SequencedContainer object. The class of this container depends on the class implementing this interface.
Implemented in bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateSequenceContainerInterface< SequenceType, HashType >, bpp::TemplateSequenceContainerInterface< SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Remove and delete a sequence from the container.
sequenceKey | The key to which the sequence is associated. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Remove and delete a sequence from the container.
sequencePosition | The position of the sequence. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure 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. |
Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, HashType >, bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Get a pointer toward the container's alphabet.
Implemented in bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >, bpp::AbstractTemplateSequenceContainer< SequenceType, std::string >, and bpp::AbstractTemplateSequenceContainer< Sequence, std::string >.
|
pure virtualinherited |
Get the comments.
Implemented in bpp::SimpleCommentable.
Referenced by bpp::Mase::appendSequencesFromStream(), bpp::AllelicAlphabet::convertFromStateAlphabet(), bpp::SiteContainerTools::getSelectedPositions(), bpp::MaseTools::getSelectedSites(), bpp::SiteContainerTools::getSelectedSites(), bpp::AbstractCoreSequence::operator=(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceTools::subseq(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::TemplateAlignedSequenceContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::Stockholm::writeAlignment(), bpp::Fasta::writeSequences(), and bpp::Mase::writeSequences().
|
pure virtualinherited |
Get the number of sequences in the container.
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtual |
Get the number of aligned positions in the container.
Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, HashType >, bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Get the position of a sequence with a given key in the container.
sequenceKey | The key to which the sequence is associated. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtual |
Get all coordinates of sites.
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
Referenced by bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::operator=().
|
pure virtualinherited |
Get the value of a state at a given position.
sitePosition | index of the site |
sequenceKey | key of the sequence in the container |
state | state in the alphabet |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Get value of a state at a given position.
sitePosition | index of the site |
sequencePosition | index of the sequence in the container |
state | state in the alphabet |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Check if a certain key is associated to a sequence in the container.
sequenceKey | The key to which the sequence is associated. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Get the value of a state at a given position.
Same as getValueAt.
sitePosition | index of the site |
sequenceKey | key of the sequence in the container |
state | state in the alphabet |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Get the value of a state at a given position.
Same as getValueAt.
sitePosition | index of the site |
sequencePosition | index of the sequence in the container |
state | state in the alphabet |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtual |
Set all positions attributes.
Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, HashType >, bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.
|
pure virtualinherited |
Retrieve a sequence object from the container.
sequenceKey | The key to which the sequence is associated. |
Implemented in bpp::TemplateSequenceContainerInterface< SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Retrieve a sequence object from the container.
sequencePosition | The position of the sequence. |
Implemented in bpp::TemplateSequenceContainerInterface< SequenceType, HashType >, bpp::TemplateSequenceContainerInterface< SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Get the key associated to a given sequence.
sequencePosition | The position of the sequence in the container. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Set the comments.
comments | The new comments. |
Implemented in bpp::SimpleCommentable.
Referenced by bpp::Pasta::appendAlignmentFromStream(), bpp::Clustal::appendAlignmentFromStream(), bpp::Fasta::appendSequencesFromStream(), and bpp::Mase::appendSequencesFromStream().
|
pure virtualinherited |
Reset all sequence keys.
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtualinherited |
Batch-set all sequence names.
names | A vector of sequence names. Must be the same size as the number of sequences in the container, otherwise a DimensionException is thrown. |
updateKeys | Tell whether the keys of the sequences should be updated with the new sequence names. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateVectorSequenceContainer< SequenceType >, and bpp::CompressedVectorSiteContainer.
|
pure virtual |
Set all coordinates of sites.
vCoordinates | A vector with all site coordinates. |
Implemented in bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >, and bpp::CompressedVectorSiteContainer.
|
pure virtual |
Get a site from a given position.
siteIndex | The position |
Implemented in bpp::TemplateSiteContainerInterface< SiteType, SequenceType, HashType >, bpp::TemplateSiteContainerInterface< Site, Sequence, std::string >, bpp::TemplateSiteContainerInterface< SiteType, SequenceType, std::string >, bpp::TemplateVectorSiteContainer< SiteType, SequenceType >, bpp::CompressedVectorSiteContainer, and bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >.