bpp-seq3
3.0.0
|
The core sequence interface. More...
#include <Bpp/Seq/CoreSequence.h>
Public Member Functions | |
CoreSequenceInterface () | |
virtual | ~CoreSequenceInterface () |
CoreSequenceInterface * | clone () const override=0 |
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 | getStateValueAt (size_t position, int state) const =0 |
get value of a state at a position More... | |
virtual double | operator() (size_t position, int state) const =0 |
get value of a state at a position 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 |
Setting/getting the name of the sequence. | |
virtual const std::string & | getName () const =0 |
Get the name of this sequence. More... | |
virtual void | setName (const std::string &name)=0 |
Set the name of this sequence. More... | |
Adjusting the size of the sequence. | |
virtual void | setToSizeR (size_t newSize)=0 |
Set up the size of a sequence from the right side. More... | |
virtual void | setToSizeL (size_t newSize)=0 |
Set up the size of a sequence from the left side. 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... | |
The core sequence interface.
This interface specifies the 'core' functionality of a sequence, that is, an ordered set of states, a name and some meta data (comments).
Definition at line 25 of file CoreSequence.h.
|
inline |
Definition at line 32 of file CoreSequence.h.
|
inlinevirtual |
Definition at line 34 of file CoreSequence.h.
|
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().
|
pure virtualinherited |
Implemented in bpp::SimpleCommentable.
|
overridepure virtual |
|
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 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 virtual |
Get the name of this sequence.
Implemented in bpp::AbstractCoreSequence.
Referenced by bpp::SequenceTools::combineSequences(), bpp::SequenceTools::concatenate(), bpp::AllelicAlphabet::convertFromStateAlphabet(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::AbstractCoreSequence::operator=(), bpp::CodonAlphabet::reverse(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::CodonAlphabet::translate(), and bpp::WordAlphabet::translate().
|
pure virtualinherited |
get value of a state at a position
position | position in the list |
state | state in the alphabet |
Implemented in bpp::Sequence, bpp::ProbabilisticSequence, bpp::ProbabilisticSymbolList, bpp::IntSymbolList, bpp::CoreSiteInterface, bpp::Site, and bpp::ProbabilisticSite.
Referenced by bpp::ProbabilisticSymbolList::ProbabilisticSymbolList().
|
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.
|
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 virtual |
Set the name of this sequence.
name | The new name of the sequence. |
Implemented in bpp::AbstractCoreSequence.
|
pure virtual |
Set up the size of a sequence from the left side.
All new characters are filled with gaps. If the specified size is < to the sequence size, the sequence will be truncated.
newSize | The new size of the sequence. |
Implemented in bpp::SequenceWithAnnotation, bpp::Sequence, and bpp::ProbabilisticSequence.
|
pure virtual |
Set up the size of a sequence from the right side.
All new characters are filled with gaps. If the specified size is < to the sequence size, the sequence will be truncated.
newSize | The new size of the sequence. |
Implemented in bpp::SequenceWithAnnotation, bpp::Sequence, and bpp::ProbabilisticSequence.
|
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=(), bpp::SiteInterface::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.