bpp-seq3
3.0.0
|
A basic implementation of the ProbabilisticSequence interface. More...
#include <Bpp/Seq/ProbabilisticSequence.h>
Public Types | |
typedef Table< double > | DataTable |
Public Member Functions | |
BasicProbabilisticSequence (const Alphabet *alpha) | |
Empty constructor : build a void ProbabilisticSequence with just an Alphabet. More... | |
BasicProbabilisticSequence (const std::string &name, const Table< double > &sequence, const Alphabet *alpha) | |
Direct constructor : build a ProbabilisticSequence object from Table<double>. More... | |
BasicProbabilisticSequence (const std::string &name, const Table< double > &sequence, const Comments &comments, const Alphabet *alpha) | |
Direct constructor : build a ProbabilisticSequence object from Table<double>. More... | |
BasicProbabilisticSequence (const BasicProbabilisticSequence &s) | |
The copy constructor. This does not perform a hard copy of the alphabet object. More... | |
BasicProbabilisticSequence & | operator= (const BasicProbabilisticSequence &s) |
The assignment operator. This does not perform a hard cop of the alphabet object. More... | |
virtual | ~BasicProbabilisticSequence () |
void | setContent (const Table< double > &content) |
const std::vector< std::vector< double > > & | getContent () const |
const DataTable & | getTable () const |
Get contents with alphabet states as column names. More... | |
void | setToSizeR (size_t newSize) |
Set up the size of a sequence from the right side. More... | |
void | setToSizeL (size_t newSize) |
Set up the size of a sequence from the left side. More... | |
void | clearComments () |
Clear the comments. More... | |
virtual const Alphabet * | getAlphabet () 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 siteIndex, int state) const |
virtual double | operator() (size_t siteIndex, int state) const |
virtual const Comments & | getComments () const =0 |
Get the comments. More... | |
virtual void | setComments (const Comments &comments)=0 |
Set the comments. More... | |
const Alphabet * | getAlphabet () const |
Get the alphabet associated to the list. More... | |
size_t | size () const |
Get the number of elements in the list. More... | |
void | setContent (const std::vector< std::vector< double > > &list) |
Set the whole content of the list. More... | |
std::string | toString () const |
Convert the list as a string. More... | |
void | addElement (const std::vector< double > &element) |
Add a character to the end of the list. More... | |
void | addElement (size_t pos, const std::vector< double > &element) |
Add a character at a certain position in the list. More... | |
void | setElement (size_t pos, const std::vector< double > &element) |
Set the element at position 'pos' to character 'c'. More... | |
const std::vector< double > & | getElement (size_t pos) const |
Get the element at position 'pos' as a character. More... | |
virtual void | deleteElement (size_t pos) |
Remove the element at position 'pos'. More... | |
virtual void | deleteElements (size_t pos, size_t len) |
Remove the elements at position 'pos'. More... | |
const std::vector< double > & | getValue (size_t pos) const |
checked access to a character in list. More... | |
const std::vector< double > & | operator[] (size_t pos) const |
Operator [] overloaded for quick access to a character in list. More... | |
std::vector< double > & | operator[] (size_t pos) |
Operator [] overloaded for quick access to a character in list. More... | |
double | getStateValueAt (size_t siteIndex, int state) const |
double | operator() (size_t siteIndex, int state) const |
void | shuffle () |
Randomly shuffle the content of the list, with linear complexity. More... | |
The Clonable interface | |
BasicProbabilisticSequence * | clone () const |
Acting on the content of the list. | |
virtual void | setContent (const std::vector< T > &list)=0 |
Set the whole content of the list. 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... | |
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... | |
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... | |
Setting/getting the name of the sequence. | |
const std::string & | getName () const |
Get the name of this sequence. More... | |
void | setName (const std::string &name) |
Set the name of this sequence. More... | |
const Comments & | getComments () const |
Get the comments. More... | |
void | setComments (const Comments &comments) |
Set the comments. More... | |
Protected Attributes | |
Comments | comments_ |
DataTable | content_ |
The list content. More... | |
Private Attributes | |
std::string | name_ |
The sequence name. More... | |
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 elmements. The states represented by the elements is defined by an alphabet object, which is passed to the contructor by a pointer.
ProbabilisticSequence objects also contain a name attribute and potentially several comment lines.
Definition at line 102 of file ProbabilisticSequence.h.
|
inherited |
Definition at line 110 of file ProbabilisticSymbolList.h.
BasicProbabilisticSequence::BasicProbabilisticSequence | ( | const Alphabet * | alpha | ) |
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.
alpha | A pointer to the Alphabet to be used with this ProbabilisticSequence. |
Definition at line 48 of file ProbabilisticSequence.cpp.
Referenced by clone().
BasicProbabilisticSequence::BasicProbabilisticSequence | ( | const std::string & | name, |
const Table< double > & | sequence, | ||
const Alphabet * | alpha | ||
) |
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>. |
alpha | 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 51 of file ProbabilisticSequence.cpp.
References setContent().
BasicProbabilisticSequence::BasicProbabilisticSequence | ( | const std::string & | name, |
const Table< double > & | sequence, | ||
const Comments & | comments, | ||
const Alphabet * | alpha | ||
) |
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>. |
comments | Comments to add to the sequence. |
alpha | 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 57 of file ProbabilisticSequence.cpp.
BasicProbabilisticSequence::BasicProbabilisticSequence | ( | const BasicProbabilisticSequence & | s | ) |
The copy constructor. This does not perform a hard copy of the alphabet object.
Definition at line 62 of file ProbabilisticSequence.cpp.
|
inlinevirtual |
Definition at line 169 of file ProbabilisticSequence.h.
|
virtualinherited |
Add a character to the end of the list.
c | The character to add. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 175 of file ProbabilisticSymbolList.cpp.
References bpp::Table< class >::addColumn(), bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfRows().
Referenced by bpp::AllelicAlphabet::convertFromStateAlphabet().
|
pure virtualinherited |
Add a character to the end of the list.
c | The character to add. |
Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::AlignedSequenceContainer::addSite(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::AbstractReverseTransliterator::reverse(), and bpp::AbstractTransliterator::translate().
|
virtualinherited |
Add a character at a certain position in the list.
pos | The postion where to insert the element. |
c | The character to add. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 199 of file ProbabilisticSymbolList.cpp.
References bpp::Table< class >::addColumn(), bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfRows().
|
pure virtualinherited |
Add a character at a certain position in the list.
pos | The postion where to insert the element. |
c | The character to add. |
Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.
|
inlinevirtual |
Clear the comments.
Implements bpp::CoreSequence.
Definition at line 189 of file ProbabilisticSequence.h.
References bpp::Commentable::clearComments().
|
inlinevirtual |
Implements bpp::AbstractCoreSequence.
Definition at line 162 of file ProbabilisticSequence.h.
References BasicProbabilisticSequence().
|
inlinevirtualinherited |
Remove the element at position 'pos'.
pos | The position of the element to remove. |
Implements bpp::CruxSymbolList.
Definition at line 213 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::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::EdSymbolList< T >, bpp::EdSymbolList< int >, bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::AlignedSequenceContainer::deleteSite(), bpp::SequenceTools::getCDS(), bpp::SequenceTools::removeGaps(), bpp::VectorSiteContainer::removeSequence(), bpp::AlignedSequenceContainer::removeSite(), and bpp::SequenceTools::removeStops().
|
inlinevirtualinherited |
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::CruxSymbolList.
Definition at line 215 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::deleteRows().
|
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::EdSymbolList< T >, bpp::EdSymbolList< int >, bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::AlignedSequenceContainer::deleteSites().
|
inlinevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::CruxSymbolList.
Definition at line 183 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::alphabet_.
Referenced by bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::BasicProbabilisticSymbolList::getStateValueAt(), and bpp::BasicProbabilisticSymbolList::operator()().
|
pure virtualinherited |
Get the alphabet associated to the list.
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::VectorProbabilisticSequenceContainer::addSequence(), bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::VectorSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), bpp::SiteContainerTools::alignNW(), bpp::BasicSequence::append(), 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::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::SequenceTools::findFirstOf(), bpp::CodonSiteTools::fixedDifferences(), bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant(), bpp::SequenceTools::getCDS(), bpp::GeneticCode::getCodingSequence(), bpp::SequenceTools::getComplement(), bpp::SymbolListTools::getCounts(), bpp::SymbolListTools::getGCContent(), bpp::SequenceTools::getNumberOfCompleteSites(), 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::CodonSiteTools::hasGapOrStop(), bpp::CodonSiteTools::hasStop(), bpp::SymbolListTools::hasUnknown(), bpp::SymbolListTools::hasUnresolved(), bpp::SequenceTools::invertComplement(), bpp::SymbolListTools::isComplete(), bpp::SymbolListTools::isConstant(), bpp::SymbolListTools::isGapOnly(), bpp::SymbolListTools::isGapOrUnresolvedOnly(), bpp::CodonSiteTools::isMonoSitePolymorphic(), bpp::CodonSiteTools::isSynonymousPolymorphic(), bpp::SymbolListTools::jointEntropy(), bpp::CodonSiteTools::meanNumberOfSynonymousPositions(), bpp::SymbolListTools::mutualInformation(), bpp::Pasta::nextSequence(), bpp::PhredPoly::nextSequence(), bpp::SymbolListTools::numberOfGaps(), bpp::CodonSiteTools::numberOfNonSynonymousSubstitutions(), bpp::CodonSiteTools::numberOfSubstitutions(), bpp::SymbolListTools::numberOfUnresolved(), bpp::SymbolList< T >::operator=(), bpp::BasicProbabilisticSymbolList::operator=(), bpp::CodonSiteTools::piNonSynonymous(), bpp::CodonSiteTools::piSynonymous(), bpp::SequenceTools::removeGaps(), bpp::SequenceTools::removeStops(), bpp::SequenceTools::replaceStopsWithGaps(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::reverseTranscript(), bpp::SequenceTools::RNYslice(), bpp::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorProbabilisticSequenceContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::VectorSequenceContainer::setSequence(), bpp::AlignedSequenceContainer::setSite(), bpp::CompressedVectorSiteContainer::setSite(), bpp::VectorSiteContainer::setSite(), bpp::SequenceTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::SequenceTools::transcript(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::WordAlphabet::translate(), bpp::SiteContainerTools::translateAlignment(), bpp::SymbolListTools::variabilityShannon(), and bpp::Pasta::writeSequence().
|
inlinevirtualinherited |
Get the comments.
Implements bpp::CoreSequence.
Reimplemented in bpp::SequenceWithQuality, and bpp::SequenceWithAnnotation.
Definition at line 235 of file CoreSequence.h.
References bpp::Commentable::getComments().
|
pure virtualinherited |
Get the comments.
Implemented in bpp::SequenceWithQuality, bpp::SequenceWithAnnotation, and bpp::AbstractCoreSequence.
Referenced by bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::AllelicAlphabet::convertFromStateAlphabet(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::AbstractProbabilisticSequenceContainer::getComments(), bpp::AbstractSequenceContainer::getComments(), bpp::VectorProbabilisticSequenceContainer::getComments(), bpp::AbstractCoreSequence::operator=(), bpp::SequenceWithAnnotation::operator=(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceTools::subseq(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::Pasta::writeSequence(), and bpp::Fasta::writeSequence().
|
inlinevirtual |
Implements bpp::ProbabilisticSequence.
Definition at line 175 of file ProbabilisticSequence.h.
References bpp::BasicProbabilisticSymbolList::getContent().
|
inlinevirtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 208 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::getColumn().
Referenced by bpp::BasicProbabilisticSymbolList::getValue().
|
pure virtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
|
inlinevirtualinherited |
Get the name of this sequence.
Implements bpp::CoreSequence.
Reimplemented in bpp::SequenceWithAnnotation.
Definition at line 231 of file CoreSequence.h.
References bpp::AbstractCoreSequence::name_.
Referenced by bpp::SequenceWithAnnotation::getName().
|
pure virtualinherited |
Get the name of this sequence.
Implemented in bpp::SequenceWithAnnotation, and bpp::AbstractCoreSequence.
Referenced by bpp::VectorProbabilisticSequenceContainer::addSequence(), bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::VectorSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::SequenceTools::combineSequences(), bpp::SequenceTools::concatenate(), bpp::AllelicAlphabet::convertFromStateAlphabet(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::VectorSequenceContainer::deleteSequenceByName(), bpp::AbstractProbabilisticSequenceContainer::getName(), bpp::AbstractSequenceContainer::getName(), bpp::VectorProbabilisticSequenceContainer::getName(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::VectorSequenceContainer::getSequenceByName(), bpp::AbstractCoreSequence::operator=(), bpp::SequenceWithAnnotation::operator=(), bpp::VectorSequenceContainer::removeSequenceByName(), bpp::CodonAlphabet::reverse(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorProbabilisticSequenceContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::VectorSequenceContainer::setSequence(), bpp::SequenceTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::CodonAlphabet::translate(), bpp::WordAlphabet::translate(), bpp::Clustal::writeAlignment(), bpp::Pasta::writeSequence(), and bpp::Fasta::writeSequence().
|
inlinevirtualinherited |
Reimplemented in bpp::BasicProbabilisticSymbolList, bpp::BasicIntSymbolList, and bpp::EdCoreSymbolList< T >.
Definition at line 147 of file CoreSymbolList.h.
Referenced by bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::EdCoreSymbolList< T >::getStateValueAt(), and bpp::Pasta::writeSequence().
|
inlinevirtualinherited |
Reimplemented from bpp::CruxSymbolList.
Definition at line 239 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, bpp::BasicProbabilisticSymbolList::getAlphabet(), bpp::Table< class >::getColumn(), bpp::Table< class >::getNumberOfColumns(), and bpp::Alphabet::getStateIndex().
|
inlinevirtual |
Get contents with alphabet states as column names.
Implements bpp::ProbabilisticSequence.
Definition at line 180 of file ProbabilisticSequence.h.
References bpp::BasicProbabilisticSymbolList::getTable().
Referenced by bpp::AllelicAlphabet::convertFromStateAlphabet().
|
inlinevirtualinherited |
checked access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 224 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::getElement().
|
pure virtualinherited |
checked access to a character in list.
pos | The position to retrieve. |
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::VectorSiteContainer::addSequence(), 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::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::SequenceTools::subtractHaplotype(), bpp::NucleicAcidsReplication::translate(), and bpp::AbstractTransliterator::translate().
|
inlinevirtualinherited |
Reimplemented in bpp::BasicProbabilisticSymbolList, bpp::BasicIntSymbolList, and bpp::EdCoreSymbolList< T >.
Definition at line 154 of file CoreSymbolList.h.
Referenced by bpp::EdCoreSymbolList< T >::operator()().
|
inlinevirtualinherited |
Reimplemented from bpp::CruxSymbolList.
Definition at line 246 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, bpp::BasicProbabilisticSymbolList::getAlphabet(), bpp::Table< class >::getColumn(), and bpp::Alphabet::getStateIndex().
BasicProbabilisticSequence & BasicProbabilisticSequence::operator= | ( | const BasicProbabilisticSequence & | s | ) |
The assignment operator. This does not perform a hard cop of the alphabet object.
Definition at line 65 of file ProbabilisticSequence.cpp.
References bpp::AbstractCoreSequence::operator=(), and bpp::BasicProbabilisticSymbolList::operator=().
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 234 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::getColumn().
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 229 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::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::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
|
pure virtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
|
inlinevirtualinherited |
Set the comments.
comments | The new comments. |
Implements bpp::CoreSequence.
Reimplemented in bpp::SequenceWithQuality, and bpp::SequenceWithAnnotation.
Definition at line 240 of file CoreSequence.h.
References bpp::Commentable::setComments().
Referenced by bpp::AllelicAlphabet::convertFromStateAlphabet().
|
pure virtualinherited |
Set the comments.
comments | The new comments. |
Implemented in bpp::SequenceWithQuality, bpp::SequenceWithAnnotation, and bpp::AbstractCoreSequence.
Referenced by bpp::Pasta::nextSequence(), bpp::Fasta::nextSequence(), bpp::VectorProbabilisticSequenceContainer::setComments(), bpp::VectorSequenceContainer::setComments(), and bpp::SequenceTools::subseq().
|
virtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 161 of file ProbabilisticSymbolList.cpp.
References bpp::BasicProbabilisticSymbolList::alphabet_, bpp::BasicProbabilisticSymbolList::content_, bpp::Alphabet::getResolvedChars(), bpp::Table< class >::setRowNames(), and bpp::BasicProbabilisticSymbolList::size().
Referenced by bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::BasicProbabilisticSymbolList::operator=(), and setContent().
|
pure virtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implemented in bpp::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::Pasta::nextSequence().
|
inline |
Definition at line 173 of file ProbabilisticSequence.h.
References bpp::BasicProbabilisticSymbolList::setContent().
Referenced by BasicProbabilisticSequence().
|
virtualinherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element. |
Implements bpp::CoreSymbolList< std::vector< double > >.
Definition at line 216 of file ProbabilisticSymbolList.cpp.
References bpp::BasicProbabilisticSymbolList::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::EdSymbolList< T >, bpp::SymbolList< T >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::SequenceTools::complement(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::SequenceTools::replaceStopsWithGaps(), and bpp::AlignedSequenceContainer::setSite().
|
inlinevirtualinherited |
Set the name of this sequence.
name | The new name of the sequence. |
Implements bpp::CoreSequence.
Reimplemented in bpp::SequenceWithAnnotation.
Definition at line 233 of file CoreSequence.h.
References bpp::AbstractCoreSequence::name_.
Referenced by bpp::AllelicAlphabet::convertFromStateAlphabet(), and bpp::SequenceWithAnnotation::setName().
|
pure virtualinherited |
Set the name of this sequence.
name | The new name of the sequence. |
Implemented in bpp::SequenceWithAnnotation, and bpp::AbstractCoreSequence.
Referenced by bpp::SequenceTools::getPutativeHaplotypes(), bpp::Pasta::nextSequence(), bpp::Fasta::nextSequence(), bpp::PhredPoly::nextSequence(), bpp::PhredPhd::nextSequence(), bpp::VectorProbabilisticSequenceContainer::setSequenceNames(), bpp::VectorSequenceContainer::setSequenceNames(), and bpp::SequenceTools::subseq().
|
inlinevirtual |
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::CoreSequence.
Definition at line 187 of file ProbabilisticSequence.h.
|
inlinevirtual |
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::CoreSequence.
Definition at line 185 of file ProbabilisticSequence.h.
|
inlinevirtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implements bpp::CruxSymbolList.
Definition at line 251 of file ProbabilisticSymbolList.h.
|
pure virtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
|
inlinevirtualinherited |
Get the number of elements in the list.
Implements bpp::CruxSymbolList.
Definition at line 185 of file ProbabilisticSymbolList.h.
References bpp::BasicProbabilisticSymbolList::content_, and bpp::Table< class >::getNumberOfColumns().
Referenced by bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), and bpp::BasicProbabilisticSymbolList::setContent().
|
pure virtualinherited |
Get the number of elements in the list.
Implemented in bpp::SymbolList< T >, bpp::SymbolList< int >, and bpp::BasicProbabilisticSymbolList.
Referenced by bpp::VectorProbabilisticSiteContainer::addSequence(), bpp::AlignedSequenceContainer::addSequence(), bpp::VectorSiteContainer::addSequence(), bpp::CompressedVectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::addSite(), bpp::VectorSiteContainer::addSite(), bpp::AlignedSequenceContainer::AlignedSequenceContainer(), bpp::BasicSequence::append(), bpp::SequenceWithAnnotation::append(), bpp::SequenceTools::areSequencesIdentical(), bpp::SymbolListTools::areSymbolListsIdentical(), bpp::SequenceTools::bowkerTest(), bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::SymbolListTools::changeUnresolvedCharactersToGaps(), bpp::AlignedSequenceContainer::checkSize_(), bpp::SequenceTools::combineSequences(), bpp::SequenceTools::complement(), bpp::SiteContainerTools::computeSimilarity(), bpp::SequenceTools::concatenate(), bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::SequenceTools::findFirstOf(), bpp::CodonSiteTools::fixedDifferences(), bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant(), bpp::SiteContainerTools::getAlignmentPositions(), bpp::SequenceTools::getCDS(), bpp::GeneticCode::getCodingSequence(), bpp::SequenceContainerTools::getCodonPosition(), bpp::SymbolListTools::getCounts(), bpp::SequenceContainerTools::getCounts(), bpp::SymbolListTools::getFrequencies(), bpp::SequenceContainerTools::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::SiteContainerTools::getSequencePositions(), bpp::SequenceTools::getSequenceWithCompleteSites(), bpp::SequenceTools::getSequenceWithoutGaps(), bpp::SequenceTools::getSequenceWithoutStops(), bpp::CompressedVectorSiteContainer::getSiteIndex_(), bpp::VectorProbabilisticSequenceContainer::getStateValueAt(), bpp::VectorSequenceContainer::getStateValueAt(), bpp::CodonAlphabet::getWord(), bpp::WordAlphabet::getWord(), bpp::SymbolListTools::hasGap(), bpp::CodonSiteTools::hasGapOrStop(), bpp::SimpleSequencePositionIterator::hasMorePositions(), bpp::SymbolListTools::hasSingleton(), bpp::CodonSiteTools::hasStop(), bpp::SymbolListTools::hasUnknown(), bpp::SymbolListTools::hasUnresolved(), bpp::SymbolListTools::heterozygosity(), bpp::SequenceMask::init(), bpp::SequenceQuality::init(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::SymbolListTools::isComplete(), bpp::SymbolListTools::isConstant(), bpp::SymbolListTools::isDoubleton(), bpp::CodonSiteTools::isFourFoldDegenerated(), bpp::SymbolListTools::isGapOnly(), bpp::SymbolListTools::isGapOrUnresolvedOnly(), bpp::CodonSiteTools::isMonoSitePolymorphic(), bpp::SymbolListTools::isParsimonyInformativeSite(), bpp::CodonSiteTools::isSynonymousPolymorphic(), bpp::SymbolListTools::isTriplet(), bpp::SymbolListTools::jointEntropy(), bpp::CodonSiteTools::meanNumberOfSynonymousPositions(), bpp::SymbolListTools::mutualInformation(), bpp::SymbolListTools::numberOfGaps(), bpp::CodonSiteTools::numberOfNonSynonymousSubstitutions(), bpp::CodonSiteTools::numberOfSubstitutions(), bpp::SymbolListTools::numberOfUnresolved(), bpp::SymbolList< T >::operator=(), operator==(), bpp::CodonSiteTools::piNonSynonymous(), bpp::CodonSiteTools::piSynonymous(), bpp::SequenceTools::removeGaps(), bpp::SequenceTools::removeStops(), bpp::SequenceTools::replaceStopsWithGaps(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::CodonAlphabet::reverse(), bpp::WordAlphabet::reverse(), bpp::NucleicAcidsReplication::reverse(), bpp::AbstractReverseTransliterator::reverse(), bpp::SequenceTools::RNYslice(), bpp::SequenceContainerTools::sequencesHaveTheSameLength(), bpp::SequenceWalker::SequenceWalker(), bpp::VectorProbabilisticSiteContainer::setSequence(), bpp::VectorSiteContainer::setSequence(), bpp::AlignedSequenceContainer::setSequence(), bpp::AlignedSequenceContainer::setSite(), bpp::CompressedVectorSiteContainer::setSite(), bpp::VectorSiteContainer::setSite(), bpp::SequenceTools::subseq(), bpp::SequenceTools::subtractHaplotype(), bpp::SymbolList< T >::SymbolList(), bpp::NucleicAcidsReplication::translate(), bpp::AbstractTransliterator::translate(), bpp::CodonAlphabet::translate(), bpp::WordAlphabet::translate(), bpp::SiteContainerTools::translateAlignment(), bpp::SymbolListTools::variabilityFactorial(), bpp::SymbolListTools::variabilityShannon(), bpp::Phylip::writeInterleaved(), bpp::Fasta::writeSequence(), bpp::Pasta::writeSequence(), and bpp::Phylip::writeSequential().
|
virtualinherited |
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::CruxSymbolList.
Definition at line 136 of file ProbabilisticSymbolList.cpp.
References bpp::BasicProbabilisticSymbolList::content_, bpp::Table< class >::getNumberOfColumns(), bpp::Table< class >::getNumberOfRows(), and bpp::Table< class >::getRowName().
|
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::SymbolList< T >, bpp::SymbolList< int >, bpp::BasicSequence, bpp::BasicProbabilisticSymbolList, bpp::EdIntSymbolList, and bpp::BasicIntSymbolList.
Referenced by bpp::SequenceWithAnnotationTools::createMaskAnnotation(), bpp::AbstractProbabilisticSequenceContainer::toString(), bpp::AbstractSequenceContainer::toString(), bpp::VectorProbabilisticSequenceContainer::toString(), bpp::Clustal::writeAlignment(), and bpp::Stockholm::writeAlignment().
|
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 119 of file ProbabilisticSymbolList.h.
Referenced by bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::BasicProbabilisticSymbolList::getAlphabet(), bpp::BasicProbabilisticSymbolList::operator=(), and bpp::BasicProbabilisticSymbolList::setContent().
|
protectedinherited |
Definition at line 63 of file Commentable.h.
Referenced by bpp::Commentable::clearComments(), bpp::Commentable::getComments(), bpp::Commentable::operator=(), and bpp::Commentable::setComments().
|
protectedinherited |
The list content.
Definition at line 125 of file ProbabilisticSymbolList.h.
Referenced by bpp::BasicProbabilisticSymbolList::addElement(), bpp::BasicProbabilisticSymbolList::BasicProbabilisticSymbolList(), bpp::BasicProbabilisticSymbolList::deleteElement(), bpp::BasicProbabilisticSymbolList::deleteElements(), bpp::BasicProbabilisticSymbolList::getContent(), bpp::BasicProbabilisticSymbolList::getElement(), bpp::BasicProbabilisticSymbolList::getStateValueAt(), bpp::BasicProbabilisticSymbolList::getTable(), bpp::BasicProbabilisticSymbolList::operator()(), bpp::BasicProbabilisticSymbolList::operator=(), bpp::BasicProbabilisticSymbolList::operator[](), bpp::BasicProbabilisticSymbolList::setContent(), bpp::BasicProbabilisticSymbolList::setElement(), bpp::BasicProbabilisticSymbolList::size(), and bpp::BasicProbabilisticSymbolList::toString().
|
privateinherited |
The sequence name.
Definition at line 163 of file CoreSequence.h.
Referenced by bpp::AbstractCoreSequence::getName(), bpp::AbstractCoreSequence::operator=(), and bpp::AbstractCoreSequence::setName().