bpp-seq3
3.0.0
|
A basic implementation of the ProbabilisticSequence interface. More...
#include <Bpp/Seq/ProbabilisticSequence.h>
Public Types | |
typedef std::vector< double > | ElementType |
typedef std::vector< double > | SymbolType |
typedef Table< double > | DTable |
Public Member Functions | |
ProbabilisticSequence (std::shared_ptr< const Alphabet > &alphabet) | |
Empty constructor : build a void ProbabilisticSequence with just an Alphabet. More... | |
ProbabilisticSequence (const std::string &name, const std::vector< ProbabilisticSequence::SymbolType > &sequence, std::shared_ptr< const Alphabet > &alphabet) | |
Direct constructor : build a ProbabilisticSequence object from a vector. More... | |
ProbabilisticSequence (const std::string &name, const DTable &sequence, std::shared_ptr< const Alphabet > &alphabet) | |
Direct constructor : build a ProbabilisticSequence object from Table<double>. More... | |
ProbabilisticSequence (const std::string &name, const std::vector< ProbabilisticSequence::SymbolType > &sequence, const Comments &comments, std::shared_ptr< const Alphabet > &alphabet) | |
Direct constructor : build a ProbabilisticSequence object from a vector. More... | |
ProbabilisticSequence (const std::string &name, const DTable &sequence, const Comments &comments, std::shared_ptr< const Alphabet > &alphabet) | |
Direct constructor : build a ProbabilisticSequence object from a DTable. More... | |
ProbabilisticSequence (const ProbabilisticSequence &sequence) | |
The copy constructor. More... | |
ProbabilisticSequence & | operator= (const ProbabilisticSequence &sequence) |
The assignment operator. More... | |
virtual | ~ProbabilisticSequence () |
void | setToSizeR (size_t newSize) override |
Set up the size of a sequence from the right side. More... | |
void | setToSizeL (size_t newSize) override |
Set up the size of a sequence from the left side. More... | |
double | getStateValueAt (size_t sitePosition, int state) const override |
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... | |
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 |
virtual const DTable & | getTable () const =0 |
virtual void | setContent (const DTable &list)=0 |
virtual void | setContent (const std::vector< T > &list)=0 |
Set the whole content of the list. More... | |
const Comments & | getComments () const override |
Get the comments. More... | |
void | setComments (const Comments &comments) override |
Set the comments. More... | |
void | clearComments () override |
std::shared_ptr< const Alphabet > | getAlphabet () const override |
Get the alphabet associated to the list. More... | |
const Alphabet & | alphabet () const override |
Get the alphabet associated to the list. More... | |
size_t | size () const override |
Get the number of elements in the list. More... | |
void | setContent (const std::vector< std::vector< double >> &list) override |
void | setContent (const DTable &list) override |
std::string | toString () const override |
Convert the list as a string. More... | |
void | addElement (const std::vector< double > &element) override |
void | addElement (size_t pos, const std::vector< double > &element) override |
void | setElement (size_t pos, const std::vector< double > &element) override |
const std::vector< double > & | getElement (size_t pos) const override |
Get the element at position 'pos' as a character. More... | |
virtual void | deleteElement (size_t pos) override |
Remove the element at position 'pos'. More... | |
virtual void | deleteElements (size_t pos, size_t len) override |
Remove the elements at position 'pos'. More... | |
const std::vector< std::vector< double > > & | getContent () const override |
const DTable & | getTable () const override |
const std::vector< double > & | getValue (size_t pos) const override |
checked access to a character in list. More... | |
const std::vector< double > & | operator[] (size_t pos) const override |
Operator [] overloaded for quick access to a character in list. More... | |
std::vector< double > & | operator[] (size_t pos) override |
Operator [] overloaded for quick access to a character in list. More... | |
double | operator() (size_t siteIndex, int state) const override |
get value of a state at a position More... | |
void | shuffle () override |
Randomly shuffle the content of the list, with linear complexity. More... | |
The Clonable interface | |
ProbabilisticSequence * | clone () const override |
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... | |
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< 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 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... | |
Setting/getting the name of the sequence. | |
const std::string & | getName () const override |
Get the name of this sequence. More... | |
void | setName (const std::string &name) override |
Set the name of this sequence. More... | |
Protected Attributes | |
Comments | comments_ |
DTable | content_ |
The list content. More... | |
Private Attributes | |
std::string | name_ |
The sequence name. More... | |
std::shared_ptr< const Alphabet > | alphabet_ |
The Alphabet attribute must be initialized in the constructor and then can never be changed. More... | |
A basic implementation of the ProbabilisticSequence interface.
This is a general purpose container, containing an ordered list of elements. The states represented by the elements is defined by an alphabet object, which is passed to the constructor by a pointer.
ProbabilisticSequence objects also contain a name attribute and potentially several comment lines.
Definition at line 56 of file ProbabilisticSequence.h.
|
inherited |
Definition at line 35 of file ProbabilisticSymbolList.h.
|
inherited |
Definition at line 35 of file ProbabilisticSequence.h.
|
inherited |
Definition at line 34 of file ProbabilisticSymbolList.h.
|
inline |
Empty constructor : build a void ProbabilisticSequence with just an Alphabet.
One can use it safely for all types of Alphabet in order to build an empty ProbabilisticSequence, i.e., without name nor sequence data.
alphabet | A pointer to the Alphabet to be used with this ProbabilisticSequence. |
Definition at line 71 of file ProbabilisticSequence.h.
Referenced by clone().
|
inline |
Direct constructor : build a ProbabilisticSequence object from a vector.
name | The sequence name. |
sequence | The entire sequence to parsed as a vector. |
alphabet | A pointer to the alphabet associated with this sequence. |
Exception | if the content is internally inconsistent, or is inconsistent with the specified alphabet. |
Definition at line 83 of file ProbabilisticSequence.h.
|
inline |
Direct constructor : build a ProbabilisticSequence object from Table<double>.
One can use it safely for RNA, DNA and protein sequences.
name | The sequence name. |
sequence | The entire sequence to parsed as a Table<double>. |
alphabet | A pointer to the alphabet associated with this sequence. |
Exception | if the content is internally inconsistent, or is inconsistent with the specified alphabet. |
Definition at line 100 of file ProbabilisticSequence.h.
|
inline |
Direct constructor : build a ProbabilisticSequence object from a vector.
name | The sequence name. |
sequence | The entire sequence to parsed as a vector. |
comments | Comments to add to the sequence. |
alphabet | A pointer to the alphabet associated with this sequence. |
Exception | if the content is internally inconsistent, or is inconsistent with the specified alphabet. |
Definition at line 117 of file ProbabilisticSequence.h.
|
inline |
Direct constructor : build a ProbabilisticSequence object from a DTable.
One can use it safely for RNA, DNA and protein sequences.
name | The sequence name. |
sequence | The entire sequence to parsed as a DTable. |
comments | Comments to add to the sequence. |
alphabet | A pointer to the alphabet associated with this sequence. |
Exception | if the content is internally inconsistent, or is inconsistent with the specified alphabet. |
Definition at line 137 of file ProbabilisticSequence.h.
|
inline |
The copy constructor.
Definition at line 149 of file ProbabilisticSequence.h.
|
inlinevirtual |
Definition at line 183 of file ProbabilisticSequence.h.
|
overrideinherited |
Definition at line 146 of file ProbabilisticSymbolList.cpp.
References bpp::Table< class >::addColumn(), bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfRows().
|
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 >.
|
overrideinherited |
Definition at line 171 of file ProbabilisticSymbolList.cpp.
References bpp::Table< class >::addColumn(), bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfRows().
|
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 >.
|
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().
|
inlineoverridevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::CruxSymbolListInterface.
Definition at line 144 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::alphabet_.
|
inlineoverridevirtualinherited |
Implements bpp::Commentable.
Definition at line 88 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
|
pure virtualinherited |
Implemented in bpp::SimpleCommentable.
|
inlineoverridevirtual |
Implements bpp::AbstractCoreSequence.
Definition at line 173 of file ProbabilisticSequence.h.
References ProbabilisticSequence().
|
inlineoverridevirtualinherited |
Remove the element at position 'pos'.
pos | The position of the element to remove. |
Implements bpp::CruxSymbolListInterface.
Definition at line 172 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::deleteColumn().
|
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().
|
inlineoverridevirtualinherited |
Remove the elements at position 'pos'.
pos | The position of the first element to remove. |
len | The length of the region to remove. |
Implements bpp::CruxSymbolListInterface.
Definition at line 177 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::deleteColumns().
|
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().
|
inlineoverridevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::CruxSymbolListInterface.
Definition at line 142 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::alphabet_.
Referenced by bpp::ProbabilisticSymbolList::getStateValueAt(), bpp::Pasta::nextSequence(), bpp::ProbabilisticSymbolList::operator()(), bpp::ProbabilisticSymbolList::ProbabilisticSymbolList(), and bpp::Pasta::writeSequence().
|
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().
|
inlineoverridevirtualinherited |
Get the comments.
Implements bpp::Commentable.
Definition at line 79 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
Referenced by bpp::SequenceWithQualityTools::concatenate(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::createEmptyContainer(), bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::createEmptyContainer(), bpp::TemplateVectorSiteContainer< SiteType, SequenceType >::createEmptyContainer(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::SequenceWithAnnotation::operator=(), bpp::SequenceWithQualityTools::subseq(), bpp::Pasta::writeSequence(), and bpp::Fasta::writeSequence().
|
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=().
|
inlineoverridevirtualinherited |
Implements bpp::TemplateCoreSymbolListInterface< T >.
Definition at line 182 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getData().
Referenced by bpp::Pasta::writeSequence().
|
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.
|
inlineoverridevirtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implements bpp::TemplateCoreSymbolListInterface< T >.
Definition at line 167 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getColumn().
Referenced by bpp::ProbabilisticSymbolList::getValue().
|
pure virtualinherited |
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().
|
inlineoverridevirtualinherited |
Get the name of this sequence.
Implements bpp::CoreSequenceInterface.
Definition at line 170 of file CoreSequence.h.
References bpp::AbstractCoreSequence::name_.
Referenced by bpp::SequenceWithQualityTools::concatenate(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::SequenceWithAnnotation::merge(), bpp::SequenceWithAnnotation::operator=(), bpp::SequenceWithQualityTools::subseq(), bpp::Clustal::writeAlignment(), bpp::Pasta::writeSequence(), and bpp::Fasta::writeSequence().
|
inlineoverridevirtual |
get value of a state at a position
position | position in the list |
state | state in the alphabet |
Implements bpp::CruxSymbolListInterface.
Definition at line 204 of file ProbabilisticSequence.h.
References bpp::ProbabilisticSymbolList::size().
|
pure virtualinherited |
Implemented in bpp::ProbabilisticSymbolList.
|
inlineoverridevirtualinherited |
Implements bpp::ProbabilisticSymbolListInterface.
Definition at line 187 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_.
|
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().
|
inlineoverridevirtualinherited |
checked access to a character in list.
pos | The position to retrieve. |
Implements bpp::TemplateCoreSymbolListInterface< T >.
Definition at line 192 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::getElement().
|
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.
|
inlineoverridevirtualinherited |
get value of a state at a position
Short-cut for getStateValueAt.
position | position in the list |
state | state in the alphabet |
Implements bpp::CruxSymbolListInterface.
Definition at line 214 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, bpp::ProbabilisticSymbolList::getAlphabet(), and bpp::Table< class >::getColumn().
|
inline |
The assignment operator.
Definition at line 160 of file ProbabilisticSequence.h.
References bpp::AbstractCoreSequence::operator=(), and bpp::ProbabilisticSymbolList::operator=().
|
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.
|
inlineoverridevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::TemplateCoreSymbolListInterface< T >.
Definition at line 197 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getColumn().
|
inlineoverridevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::TemplateCoreSymbolListInterface< T >.
Definition at line 202 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getColumn().
|
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.
|
inlineoverridevirtualinherited |
Set the comments.
comments | The new comments. |
Implements bpp::Commentable.
Definition at line 86 of file Commentable.h.
References bpp::SimpleCommentable::comments_.
Referenced by bpp::CompressedVectorSiteContainer::createEmptyContainer(), bpp::TemplateVectorSequenceContainer< SequenceType >::createEmptyContainer(), bpp::Pasta::nextSequence(), bpp::Fasta::nextSequence(), bpp::AbstractCoreSequence::operator=(), bpp::SequenceWithAnnotation::operator=(), bpp::AbstractTemplateSequenceContainer< SequenceType, HashType >::operator=(), bpp::TemplateVectorSequenceContainer< SequenceType >::operator=(), bpp::TemplateAlignedSequenceContainer< SequenceType, SiteType >::TemplateAlignedSequenceContainer(), and bpp::TemplateVectorSequenceContainer< SequenceType >::TemplateVectorSequenceContainer().
|
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().
|
overridevirtualinherited |
Implements bpp::ProbabilisticSymbolListInterface.
Definition at line 76 of file ProbabilisticSymbolList.cpp.
References bpp::ProbabilisticSymbolList::alphabet_, bpp::ProbabilisticSymbolList::content_, bpp::Table< class >::getNumberOfRows(), bpp::Table< class >::getRowNames(), bpp::Table< class >::hasRowNames(), bpp::Table< class >::setRowNames(), bpp::ProbabilisticSymbolList::size(), and bpp::TextTools::toString().
|
pure virtualinherited |
Implemented in bpp::ProbabilisticSymbolList.
|
overrideinherited |
Definition at line 132 of file ProbabilisticSymbolList.cpp.
References bpp::ProbabilisticSymbolList::alphabet_, bpp::ProbabilisticSymbolList::content_, bpp::Table< class >::setRowNames(), and bpp::ProbabilisticSymbolList::size().
Referenced by bpp::Pasta::nextSequence().
|
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::ProbabilisticSymbolList::operator=(), and bpp::ProbabilisticSymbolList::ProbabilisticSymbolList().
|
overrideinherited |
Definition at line 188 of file ProbabilisticSymbolList.cpp.
References bpp::ProbabilisticSymbolList::content_, bpp::Table< class >::getNumberOfRows(), and bpp::Table< class >::setColumn().
|
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 >.
|
inlineoverridevirtualinherited |
Set the name of this sequence.
name | The new name of the sequence. |
Implements bpp::CoreSequenceInterface.
Definition at line 172 of file CoreSequence.h.
References bpp::AbstractCoreSequence::name_.
Referenced by bpp::Pasta::nextSequence(), bpp::PhredPoly::nextSequence(), bpp::Fasta::nextSequence(), bpp::PhredPhd::nextSequence(), and bpp::SequenceWithAnnotation::operator=().
|
pure virtualinherited |
Set the name of this sequence.
name | The new name of the sequence. |
Implemented in bpp::AbstractCoreSequence.
|
overridevirtual |
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. |
Implements bpp::CoreSequenceInterface.
Definition at line 40 of file ProbabilisticSequence.cpp.
|
overridevirtual |
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. |
Implements bpp::CoreSequenceInterface.
Definition at line 16 of file ProbabilisticSequence.cpp.
|
inlineoverridevirtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implements bpp::CruxSymbolListInterface.
Definition at line 219 of file ProbabilisticSymbolList.h.
|
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().
|
inlineoverridevirtualinherited |
Get the number of elements in the list.
Implements bpp::CruxSymbolListInterface.
Definition at line 146 of file ProbabilisticSymbolList.h.
References bpp::ProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfColumns().
Referenced by bpp::SequenceContainerTools::getFrequencies(), bpp::ProbabilisticSite::getStateValueAt(), getStateValueAt(), bpp::ProbabilisticSymbolList::ProbabilisticSymbolList(), and bpp::ProbabilisticSymbolList::setContent().
|
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.
|
overridevirtualinherited |
Convert the list as a string.
This method is useful for dumping a list to a file or to the screen for display.
Implements bpp::CruxSymbolListInterface.
Definition at line 108 of file ProbabilisticSymbolList.cpp.
References bpp::ProbabilisticSymbolList::content_, bpp::Table< class >::getNumberOfColumns(), bpp::Table< class >::getNumberOfRows(), and bpp::Table< class >::getRowName().
|
privateinherited |
The Alphabet attribute must be initialized in the constructor and then can never be changed.
To apply another alphabet to the list requires creating another list.
Definition at line 71 of file ProbabilisticSymbolList.h.
Referenced by bpp::ProbabilisticSymbolList::alphabet(), bpp::ProbabilisticSymbolList::getAlphabet(), bpp::ProbabilisticSymbolList::operator=(), bpp::ProbabilisticSymbolList::ProbabilisticSymbolList(), and bpp::ProbabilisticSymbolList::setContent().
|
protectedinherited |
Definition at line 50 of file Commentable.h.
Referenced by bpp::SimpleCommentable::clearComments(), bpp::SimpleCommentable::getComments(), bpp::SimpleCommentable::operator=(), and bpp::SimpleCommentable::setComments().
|
protectedinherited |
The list content.
Definition at line 77 of file ProbabilisticSymbolList.h.
Referenced by bpp::ProbabilisticSymbolList::addElement(), bpp::ProbabilisticSymbolList::deleteElement(), bpp::ProbabilisticSymbolList::deleteElements(), bpp::ProbabilisticSymbolList::getContent(), bpp::ProbabilisticSymbolList::getElement(), bpp::ProbabilisticSymbolList::getStateValueAt(), bpp::ProbabilisticSymbolList::getTable(), bpp::ProbabilisticSymbolList::operator()(), bpp::ProbabilisticSymbolList::operator=(), bpp::ProbabilisticSymbolList::operator[](), bpp::ProbabilisticSymbolList::ProbabilisticSymbolList(), bpp::ProbabilisticSymbolList::setContent(), bpp::ProbabilisticSymbolList::setElement(), bpp::ProbabilisticSymbolList::size(), and bpp::ProbabilisticSymbolList::toString().
|
privateinherited |
The sequence name.
Definition at line 103 of file CoreSequence.h.
Referenced by bpp::AbstractCoreSequence::getName(), bpp::AbstractCoreSequence::operator=(), and bpp::AbstractCoreSequence::setName().