bpp-seq3
3.0.0
|
The AbstractSequenceSymbolList virtual class : SymbolList<T> is built, there. More...
#include <Bpp/Seq/CoreSequenceSymbolList.h>
Public Member Functions | |
virtual | ~AbstractSequenceSymbolList () |
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... | |
virtual void | setContent (const std::vector< T > &list) |
Set the whole content of the list. More... | |
virtual const std::vector< T > & | getContent () const |
virtual std::string | toString () const |
Convert the list as a string. More... | |
void | deleteElement (size_t pos) |
Remove the element at position 'pos'. More... | |
void | deleteElements (size_t pos, size_t len) |
Remove the elements at position 'pos'. More... | |
void | addElement (const T &v) |
Add a character to the end of the list. More... | |
void | addElement (size_t pos, const T &v) |
Add a character at a certain position in the list. More... | |
void | setElement (size_t pos, const T &v) |
Set the element at position 'pos' to character 'c'. More... | |
virtual const T & | getElement (size_t pos) const |
Get the element at position 'pos' as a character. More... | |
virtual const T & | getValue (size_t pos) const |
checked access to a character in list. More... | |
virtual const T & | operator[] (size_t pos) const |
Operator [] overloaded for quick access to a character in list. More... | |
virtual T & | operator[] (size_t pos) |
Operator [] overloaded for quick access to a character in list. More... | |
virtual void | shuffle () |
Randomly shuffle the content of the list, with linear complexity. 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... | |
virtual void | clearComments ()=0 |
Clear the comments. More... | |
The Clonable interface | |
AbstractSequenceSymbolList * | clone () const =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... | |
Protected Attributes | |
std::vector< T > | content_ |
The list content. More... | |
Private Attributes | |
const Alphabet * | alphabet_ |
The Alphabet attribute must be initialized in constructor and then can never be changed. More... | |
The AbstractSequenceSymbolList virtual class : SymbolList<T> is built, there.
Definition at line 93 of file CoreSequenceSymbolList.h.
|
inlinevirtual |
Definition at line 107 of file CoreSequenceSymbolList.h.
|
inlinevirtualinherited |
Add a character to the end of the list.
c | The character to add. |
Implements bpp::CoreSymbolList< T >.
Reimplemented in bpp::EdSymbolList< T >.
Definition at line 199 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
Referenced by bpp::EdSymbolList< T >::addElement().
|
inlinevirtualinherited |
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< T >.
Reimplemented in bpp::EdSymbolList< T >.
Definition at line 204 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
|
pure virtualinherited |
Clear the comments.
Implemented in bpp::SequenceWithQuality, bpp::SequenceWithAnnotation, bpp::BasicSequence, and bpp::BasicProbabilisticSequence.
|
pure virtual |
Implements bpp::CoreSequenceSymbolList< T >.
|
inlinevirtualinherited |
Remove the element at position 'pos'.
pos | The position of the element to remove. |
Implements bpp::CruxSymbolList.
Reimplemented in bpp::EdSymbolList< T >, and bpp::EdSymbolList< int >.
Definition at line 185 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
Referenced by bpp::EdSymbolList< T >::deleteElement().
|
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.
Reimplemented in bpp::EdSymbolList< T >, and bpp::EdSymbolList< int >.
Definition at line 192 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
Referenced by bpp::EdSymbolList< T >::deleteElements().
|
inlinevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::CruxSymbolList.
Definition at line 169 of file SymbolList.h.
References bpp::SymbolList< T >::alphabet_.
Referenced by bpp::SequenceWithQualityTools::complement(), bpp::SequenceWithQualityTools::concatenate(), bpp::SequenceWithAnnotation::merge(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SequenceWithQualityTools::reverseTranscript(), bpp::SequenceWithQualityTools::subseq(), and bpp::SequenceWithQualityTools::transcript().
|
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().
|
inlinevirtualinherited |
Implements bpp::CoreSymbolList< T >.
Definition at line 178 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 220 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
|
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 |
checked access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 227 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
Referenced by bpp::CodonSiteTools::generateCodonSiteWithoutRareVariant(), bpp::CodonSiteTools::isFourFoldDegenerated(), and bpp::CodonSiteTools::numberOfSubstitutions().
|
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 |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 236 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
pos | The position to retrieve. |
Implements bpp::CoreSymbolList< T >.
Definition at line 234 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
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().
|
inlinevirtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implements bpp::CoreSymbolList< T >.
Reimplemented in bpp::EdSymbolList< T >, bpp::EdSymbolList< int >, bpp::SequenceWithAnnotation, bpp::BasicSequence, bpp::EdIntSymbolList, and bpp::BasicIntSymbolList.
Definition at line 173 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
Referenced by bpp::BasicIntSymbolList::setContent(), bpp::EdSymbolList< T >::setContent(), and bpp::SymbolList< T >::SymbolList().
|
inlinevirtualinherited |
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< T >.
Reimplemented in bpp::EdSymbolList< T >.
Definition at line 212 of file SymbolList.h.
References bpp::SymbolList< T >::content_, and bpp::SymbolList< T >::size().
Referenced by bpp::EdSymbolList< T >::setElement().
|
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().
|
pure virtualinherited |
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::BasicSequence, and bpp::BasicProbabilisticSequence.
|
pure virtualinherited |
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::BasicSequence, and bpp::BasicProbabilisticSequence.
Referenced by bpp::SequenceTools::concatenate().
|
inlinevirtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implements bpp::CruxSymbolList.
Definition at line 238 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
|
inlinevirtualinherited |
Get the number of elements in the list.
Implements bpp::CruxSymbolList.
Definition at line 171 of file SymbolList.h.
References bpp::SymbolList< T >::content_.
Referenced by bpp::SymbolList< T >::addElement(), bpp::SymbolList< T >::deleteElement(), bpp::SymbolList< T >::deleteElements(), bpp::SymbolList< T >::getElement(), bpp::SymbolList< T >::getValue(), bpp::SequenceMask::isValidWith(), bpp::SequenceQuality::isValidWith(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SymbolList< T >::setElement(), and bpp::SequenceWithQualityTools::subseq().
|
inlinevirtualinherited |
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.
Reimplemented in bpp::BasicSequence, bpp::EdIntSymbolList, and bpp::BasicIntSymbolList.
Definition at line 180 of file SymbolList.h.
|
privateinherited |
The Alphabet attribute must be initialized in constructor and then can never be changed.
To apply another alphabet to a list you'll have to create a new list.
Definition at line 79 of file SymbolList.h.
Referenced by bpp::SymbolList< T >::getAlphabet(), and bpp::SymbolList< T >::operator=().
|
protectedinherited |
The list content.
Definition at line 85 of file SymbolList.h.
Referenced by bpp::SymbolList< T >::addElement(), bpp::SymbolList< T >::deleteElement(), bpp::SymbolList< T >::deleteElements(), bpp::SymbolList< T >::getContent(), bpp::SymbolList< T >::getElement(), bpp::SymbolList< T >::getValue(), bpp::SymbolList< T >::operator=(), bpp::SymbolList< T >::operator[](), bpp::SymbolList< T >::setContent(), bpp::SymbolList< T >::setElement(), bpp::SymbolList< T >::shuffle(), bpp::SymbolList< T >::size(), and bpp::SymbolList< T >::SymbolList().