bpp-seq3
3.0.0
|
The site interface. More...
#include <Bpp/Seq/Site.h>
Public Types | |
typedef int | SymbolType |
Public Member Functions | |
virtual | ~SiteInterface () |
SiteInterface * | clone () const override=0 |
virtual bool | operator== (const SiteInterface &site) |
virtual bool | operator< (const SiteInterface &site) |
virtual double | getStateValueAt (size_t sequencePosition, int state) const override=0 |
get value of a state at a position More... | |
virtual std::shared_ptr< const Alphabet > | getAlphabet () const =0 |
Get the alphabet associated to the list. More... | |
virtual const Alphabet & | alphabet () const =0 |
Get the alphabet associated to the list. More... | |
virtual size_t | size () const =0 |
Get the number of elements in the list. More... | |
virtual std::string | toString () const =0 |
Convert the list as a string. More... | |
virtual double | operator() (size_t position, int state) const =0 |
get value of a state at a position More... | |
Setting/getting the position of the site. | |
virtual int | getCoordinate () const =0 |
Get the coordinate associated to this site. More... | |
virtual void | setCoordinate (int coordinate)=0 |
Set the position of this site. More... | |
Edition methods. | |
virtual void | deleteElement (size_t pos)=0 |
Remove the element at position 'pos'. More... | |
virtual void | deleteElements (size_t pos, size_t len)=0 |
Remove the elements at position 'pos'. More... | |
Provide direct access to the list content. | |
| |
virtual void | shuffle ()=0 |
Randomly shuffle the content of the list, with linear complexity. More... | |
Acting on the content of the list. | |
virtual void | setContent (const std::vector< std::string > &list)=0 |
Set the whole content of the list. More... | |
virtual void | setContent (const std::vector< T > &list)=0 |
Set the whole content of the list. More... | |
Acting on the content of the list. | |
virtual void | setContent (const std::vector< T > &list)=0 |
Set the whole content of the list. More... | |
virtual const std::vector< T > & | getContent () const =0 |
Edition methods. | |
virtual void | addElement (const std::string &c)=0 |
Add a character to the end of the list. More... | |
virtual void | addElement (size_t pos, const std::string &c)=0 |
Add a character at a certain position in the list. More... | |
virtual void | addElement (const T &c)=0 |
Add a character to the end of the list. More... | |
virtual void | addElement (size_t pos, const T &c)=0 |
Add a character at a certain position in the list. More... | |
virtual void | setElement (size_t pos, const std::string &c)=0 |
Set the element at position 'pos' to character 'c'. More... | |
virtual void | setElement (size_t pos, const T &c)=0 |
Set the element at position 'pos' to character 'c'. More... | |
virtual std::string | getChar (size_t pos) const =0 |
Get the element at position 'pos' as a character. More... | |
Edition methods. | |
virtual void | addElement (const T &c)=0 |
Add a character to the end of the list. More... | |
virtual void | addElement (size_t pos, const T &c)=0 |
Add a character at a certain position in the list. More... | |
virtual void | setElement (size_t pos, const T &c)=0 |
Set the element at position 'pos' to character 'c'. More... | |
virtual const T & | getElement (size_t pos) const =0 |
Get the element at position 'pos' as a character. More... | |
Provide direct access to the list content. | |
| |
virtual const T & | getValue (size_t pos) const =0 |
checked access to a character in list. More... | |
virtual const T & | operator[] (size_t pos) const =0 |
Operator [] overloaded for quick access to a character in list. More... | |
virtual T & | operator[] (size_t pos)=0 |
Operator [] overloaded for quick access to a character in list. More... | |
The site interface.
Define specific attributes and methods for sites manipulation. Currently, this interface does not add any additional method to the CoreSite interface, but this may change in the future.
|
inherited |
Definition at line 31 of file IntSymbolList.h.
|
pure virtualinherited |
Add a character to the end of the list.
c | The character to add, given as a string. |
Implemented in bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.
|
pure virtualinherited |
Add a character to the end of the list.
c | The character to add. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, and bpp::AbstractTemplateSymbolList< T >.
|
inherited |
Add a character to the end of the list.
c | The character to add. |
Referenced by bpp::SequenceWithQuality::addElement().
|
pure virtualinherited |
Add a character at a certain position in the list.
pos | The position where to insert the element. |
c | The character to add, given as a string. |
Implemented in bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.
|
pure virtualinherited |
Add a character at a certain position in the list.
pos | The position where to insert the element. |
c | The character to add. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, and bpp::AbstractTemplateSymbolList< T >.
|
inherited |
Add a character at a certain position in the list.
pos | The position where to insert the element. |
c | The character to add. |
|
pure virtualinherited |
Get the alphabet associated to the list.
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::SequenceTools::combineSequences(), bpp::SequenceTools::complement(), bpp::SequenceTools::concatenate(), bpp::GeneticCode::getCodingSequence(), bpp::SequenceTools::getComplement(), bpp::SequenceTools::getNumberOfCompleteSites(), bpp::SequenceTools::getNumberOfSites(), bpp::SequenceTools::getPercentIdentity(), bpp::SequenceTools::getSequenceWithCompleteSites(), bpp::SequenceTools::invertComplement(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), and bpp::AbstractTransliterator::translate().
|
overridepure virtual |
Implements bpp::CoreSiteInterface.
Implemented in bpp::Site.
|
pure virtualinherited |
Remove the element at position 'pos'.
pos | The position of the element to remove. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, bpp::AbstractTemplateEventDrivenSymbolList< int >, bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::SequenceTools::getCDS(), bpp::SequenceTools::removeGaps(), and bpp::SequenceTools::removeStops().
|
pure virtualinherited |
Remove the elements at position 'pos'.
pos | The position of the first element to remove. |
len | The length of the region to remove. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, bpp::AbstractTemplateEventDrivenSymbolList< int >, bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
|
pure virtualinherited |
Get the alphabet associated to the list.
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::Sequence::append(), bpp::SequenceWithAnnotation::append(), bpp::SequenceTools::areSequencesIdentical(), bpp::SymbolListTools::areSymbolListsIdentical(), bpp::SequenceTools::bowkerTest(), bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::SymbolListTools::changeUnresolvedCharactersToGaps(), bpp::SequenceTools::combineSequences(), bpp::SequenceWithQualityTools::complement(), bpp::SequenceTools::complement(), bpp::SiteContainerTools::computeSimilarity(), bpp::SequenceTools::concatenate(), bpp::SequenceWithQualityTools::concatenate(), bpp::SequenceTools::findFirstOf(), bpp::SequenceTools::getCDS(), bpp::SequenceTools::getComplement(), bpp::SymbolListTools::getCountsResolveUnknowns(), bpp::SymbolListTools::getGCContent(), bpp::SymbolListTools::getNumberOfDistinctPositions(), bpp::SymbolListTools::getNumberOfPositionsWithoutGap(), bpp::SequenceTools::getNumberOfUnresolvedSites(), bpp::SequenceTools::getPercentIdentity(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::SequenceTools::getSequenceWithoutGaps(), bpp::SequenceTools::getSequenceWithoutStops(), bpp::SymbolListTools::hasGap(), bpp::SymbolListTools::hasUnknown(), bpp::SymbolListTools::hasUnresolved(), bpp::SequenceTools::invertComplement(), bpp::SymbolListTools::isComplete(), bpp::SymbolListTools::isConstant(), bpp::SymbolListTools::isGapOnly(), bpp::SymbolListTools::isGapOrUnresolvedOnly(), bpp::SymbolListTools::jointEntropy(), bpp::SequenceWithAnnotation::merge(), bpp::SymbolListTools::mutualInformation(), bpp::SymbolListTools::numberOfGaps(), bpp::SymbolListTools::numberOfUnresolved(), bpp::ProbabilisticSymbolList::operator=(), bpp::AbstractTemplateSymbolList< T >::operator=(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SequenceTools::removeGaps(), bpp::SequenceTools::removeStops(), bpp::SequenceTools::replaceStopsWithGaps(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::SequenceWithQualityTools::reverseTranscript(), bpp::SequenceTools::RNYslice(), bpp::SequenceTools::subseq(), bpp::SequenceWithQualityTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::SequenceWithQualityTools::transcript(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::WordAlphabet::translate(), and bpp::SymbolListTools::variabilityShannon().
|
pure virtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implemented in bpp::Sequence, bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.
|
pure virtualinherited |
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::Sequence::append(), bpp::SequenceWithQualityTools::concatenate(), bpp::SequenceWithQualityTools::invert(), bpp::SequenceWithAnnotation::merge(), bpp::ProbabilisticSymbolList::operator=(), and bpp::Sequence::operator=().
|
pure virtualinherited |
Get the coordinate associated to this site.
Implemented in bpp::AbstractCoreSite.
Referenced by operator<(), bpp::AbstractCoreSite::operator=(), and operator==().
|
pure virtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
|
overridepure virtualinherited |
get value of a state at a position
sequencePosition | index of the looked value in the site |
state | state in the alphabet |
Implements bpp::CruxSymbolListInterface.
Implemented in bpp::Site, and bpp::ProbabilisticSite.
|
pure virtualinherited |
checked access to a character in list.
pos | The position to retrieve. |
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::SequenceTools::combineSequences(), bpp::SequenceTools::complement(), bpp::SequenceTools::findFirstOf(), bpp::SymbolListTools::getGCContent(), bpp::SequenceTools::getPercentIdentity(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::subtractHaplotype(), bpp::NucleicAcidsReplication::translate(), and bpp::AbstractTransliterator::translate().
|
pure virtualinherited |
get value of a state at a position
Short-cut for getStateValueAt.
position | position in the list |
state | state in the alphabet |
Implemented in bpp::ProbabilisticSymbolList, and bpp::IntSymbolList.
|
inlinevirtual |
Definition at line 51 of file Site.h.
References bpp::CoreSiteInterface::getCoordinate().
|
inlinevirtual |
Definition at line 31 of file Site.h.
References bpp::CoreSiteInterface::getCoordinate(), and bpp::CruxSymbolListInterface::size().
|
pure virtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
|
pure virtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
|
pure virtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implemented in bpp::SequenceInterface, bpp::SequenceWithAnnotation, bpp::Sequence, bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.
|
pure virtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, and bpp::AbstractTemplateSymbolList< T >.
|
inherited |
Set the whole content of the list.
list | The new content of the list. |
Referenced by bpp::EventDrivenIntSymbolList::EventDrivenIntSymbolList(), bpp::IntSymbolList::IntSymbolList(), bpp::SequenceWithAnnotation::operator=(), bpp::Sequence::operator=(), bpp::Sequence::Sequence(), bpp::SequenceWithAnnotation::SequenceWithAnnotation(), bpp::Sequence::setContent(), and bpp::SequenceWithAnnotation::setContent().
|
pure virtualinherited |
Set the position of this site.
coordinate | The new position of the site. |
Implemented in bpp::AbstractCoreSite.
|
pure virtualinherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element, given as a string. |
Implemented in bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.
Referenced by bpp::SequenceTools::complement(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), and bpp::SequenceTools::replaceStopsWithGaps().
|
pure virtualinherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element. |
Implemented in bpp::AbstractTemplateEventDrivenSymbolList< T >, and bpp::AbstractTemplateSymbolList< T >.
|
inherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element. |
|
pure virtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
|
pure virtualinherited |
Get the number of elements in the list.
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, and bpp::ProbabilisticSymbolList.
Referenced by bpp::AbstractTemplateSymbolList< T >::AbstractTemplateSymbolList(), bpp::SequenceWithQuality::addElement(), bpp::SequenceWithAnnotation::append(), bpp::SequenceTools::areSequencesIdentical(), bpp::SymbolListTools::areSymbolListsIdentical(), bpp::SequenceTools::bowkerTest(), bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::SymbolListTools::changeUnresolvedCharactersToGaps(), bpp::SequenceTools::combineSequences(), bpp::SequenceTools::complement(), bpp::SiteContainerTools::computeSimilarity(), bpp::SequenceTools::concatenate(), bpp::SequenceTools::findFirstOf(), bpp::SequenceTools::getCDS(), bpp::GeneticCode::getCodingSequence(), bpp::SymbolListTools::getCounts(), bpp::SymbolListTools::getCountsResolveUnknowns(), bpp::SymbolListTools::getFrequencies(), bpp::SymbolListTools::getGCContent(), bpp::SymbolListTools::getMajorAllele(), bpp::SymbolListTools::getMajorAlleleFrequency(), bpp::SymbolListTools::getMinorAllele(), bpp::SymbolListTools::getMinorAlleleFrequency(), bpp::SequenceTools::getNumberOfCompleteSites(), bpp::SymbolListTools::getNumberOfDistinctCharacters(), bpp::SymbolListTools::getNumberOfDistinctPositions(), bpp::SymbolListTools::getNumberOfPositionsWithoutGap(), bpp::SequenceTools::getNumberOfSites(), bpp::SequenceTools::getNumberOfUnresolvedSites(), bpp::SequenceTools::getPercentIdentity(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::SequenceTools::getSequenceWithCompleteSites(), bpp::SequenceTools::getSequenceWithoutGaps(), bpp::SequenceTools::getSequenceWithoutStops(), bpp::SymbolListTools::hasGap(), bpp::SymbolListTools::hasSingleton(), bpp::SymbolListTools::hasUnknown(), bpp::SymbolListTools::hasUnresolved(), bpp::SymbolListTools::heterozygosity(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::SymbolListTools::isComplete(), bpp::SymbolListTools::isConstant(), bpp::SymbolListTools::isDoubleton(), bpp::SymbolListTools::isGapOnly(), bpp::SymbolListTools::isGapOrUnresolvedOnly(), bpp::SymbolListTools::isParsimonyInformativeSite(), bpp::SymbolListTools::isTriplet(), bpp::SequenceMask::isValidWith(), bpp::SequenceQuality::isValidWith(), bpp::SymbolListTools::jointEntropy(), bpp::SymbolListTools::mutualInformation(), bpp::SymbolListTools::numberOfGaps(), bpp::SymbolListTools::numberOfUnresolved(), bpp::AbstractTemplateSymbolList< T >::operator=(), operator==(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SequenceTools::removeGaps(), bpp::SequenceTools::removeStops(), bpp::SequenceTools::replaceStopsWithGaps(), bpp::CodonAlphabet::reverse(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceWalker::SequenceWalker(), bpp::SequenceTools::subseq(), bpp::SequenceWithQualityTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::CodonAlphabet::translate(), bpp::WordAlphabet::translate(), bpp::SymbolListTools::variabilityFactorial(), and bpp::SymbolListTools::variabilityShannon().
|
pure virtualinherited |
Convert the list as a string.
This method is useful for dumping a list to a file or to the screen for display.
Implemented in bpp::AbstractTemplateSymbolList< T >, bpp::AbstractTemplateSymbolList< int >, bpp::Sequence, bpp::ProbabilisticSymbolList, bpp::EventDrivenIntSymbolList, and bpp::IntSymbolList.