bpp-seq
2.2.0
|
A SequenceWithAnnotation class with quality scores attached. More...
#include <Bpp/Seq/SequenceWithQuality.h>
Public Member Functions | |
SequenceWithQuality (const SequenceWithQuality &sequence) | |
SequenceWithQuality & | operator= (const SequenceWithQuality &sequence) |
virtual void | addAnnotation (SequenceAnnotation *anno) throw (Exception) |
Add a new annotation to the sequence. More... | |
virtual bool | hasAnnotation (const std::string &type) const |
virtual const SequenceAnnotation & | getAnnotation (const std::string &type) const |
virtual SequenceAnnotation & | getAnnotation (const std::string &type) |
virtual std::vector< std::string > | getAnnotationTypes () const |
virtual void | merge (const SequenceWithAnnotation &swa) throw (AlphabetMismatchException, Exception) |
Merge a sequence with the current one. More... | |
virtual const Alphabet * | getAlphabet () const =0 |
Get the alphabet associated to the list. More... | |
virtual const Alphabet * | getAlphabet () const |
Get the alphabet associated to the list. More... | |
virtual size_t | size () const =0 |
Get the number of elements in the list. More... | |
virtual size_t | size () const |
Get the number of elements in the list. More... | |
virtual const std::vector< int > & | getContent () const |
Get the whole content of the list as a vector of int. More... | |
virtual std::string | toString () const =0 |
Convert the list as a string. More... | |
virtual std::string | toString () const |
Convert the list as a string. More... | |
virtual void | setElement (size_t pos, const std::string &c) throw (BadCharException, IndexOutOfBoundsException) |
Set the element at position 'pos' to character 'c'. More... | |
virtual void | setElement (size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException) |
Set the element at position 'pos' to character 'v'. More... | |
virtual void | deleteElement (size_t pos) throw (IndexOutOfBoundsException) |
Delete the element at position 'pos'. More... | |
virtual void | deleteElements (size_t pos, size_t len) throw (IndexOutOfBoundsException) |
Delete the elements at position 'pos'. More... | |
virtual std::string | getChar (size_t pos) const throw (IndexOutOfBoundsException) |
Get the element at position 'pos' as a character. More... | |
virtual int | getValue (size_t pos) const throw (IndexOutOfBoundsException) |
Get the element at position 'pos' as an int. More... | |
virtual const int & | operator[] (size_t i) const |
Operator [] overloaded for quick access to a character in list. More... | |
virtual int & | operator[] (size_t i) |
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... | |
Constructors | |
SequenceWithQuality (const Alphabet *alpha) | |
Build a new empty SequenceWithQuality. More... | |
SequenceWithQuality (const std::string &name, const std::string &sequence, const Alphabet *alpha) throw (BadCharException) | |
Build a new SequenceWithQuality from a std::string. More... | |
SequenceWithQuality (const std::string &name, const std::string &sequence, const Comments &comments, const Alphabet *alpha) throw (BadCharException) | |
Build a new SequenceWithQuality from a std::string. More... | |
SequenceWithQuality (const std::string &name, const std::string &sequence, const std::vector< int > &quality, const Alphabet *alpha) throw (BadCharException, DimensionException) | |
Build a new SequenceWithQuality from a std::string. More... | |
SequenceWithQuality (const std::string &name, const std::string &sequence, const std::vector< int > &quality, const Comments &comments, const Alphabet *alpha) throw (BadCharException, DimensionException) | |
Build a new SequenceWithQuality from a std::string. More... | |
SequenceWithQuality (const std::string &name, const std::vector< int > &sequence, const Alphabet *alpha) throw (BadIntException) | |
Build a new SequenceWithQuality from a std::vector<int> More... | |
SequenceWithQuality (const std::string &name, const std::vector< int > &sequence, const Comments &comments, const Alphabet *alpha) throw (BadIntException) | |
Build a new SequenceWithQuality from a std::vector<int> More... | |
SequenceWithQuality (const std::string &name, const std::vector< int > &sequence, const std::vector< int > &quality, const Alphabet *alpha) throw (BadIntException, DimensionException) | |
Build a new SequenceWithQuality from a std::vector<int> More... | |
SequenceWithQuality (const std::string &name, const std::vector< int > &sequence, const std::vector< int > &quality, const Comments &comments, const Alphabet *alpha) throw (BadIntException, DimensionException) | |
Build a new SequenceWithQuality from a std::vector<int> More... | |
SequenceWithQuality (const Sequence &s) | |
Build a new SequenceWithQuality. More... | |
SequenceWithQuality (const Sequence &s, const std::vector< int > &sc) throw (DimensionException) | |
Build a new SequenceWithQuality. More... | |
Destructor | |
virtual | ~SequenceWithQuality () |
The Clonable interface | |
SequenceWithQuality * | clone () const |
Dealing with quality | |
void | setQuality (size_t pos, int quality) throw (IndexOutOfBoundsException) |
Set the quality score. More... | |
int | getQuality (size_t pos) const throw (IndexOutOfBoundsException) |
Get the quality score. More... | |
void | setQualities (const std::vector< int > &quality) throw (DimensionException) |
Set the whole quality scores. More... | |
const std::vector< int > & | getQualities () const |
Get the whole quality scores. More... | |
void | append (const std::vector< int > &content) throw (BadIntException) |
Append the specified content to the sequence. More... | |
void | append (const std::vector< int > &content, const std::vector< int > &qualities) throw (BadIntException, DimensionException) |
Append content with quality. More... | |
void | append (const std::vector< std::string > &content) throw (BadCharException) |
Append the specified content to the sequence. More... | |
void | append (const std::vector< std::string > &content, const std::vector< int > &qualities) throw (BadCharException, DimensionException) |
Append content with quality. More... | |
void | append (const std::string &content) throw (BadCharException) |
Append the specified content to the sequence. More... | |
void | append (const std::string &content, const std::vector< int > &qualities) throw (BadCharException, DimensionException) |
Append content with quality. More... | |
void | addElement (const std::string &c) throw (BadCharException) |
Add a character to the end of the list. More... | |
void | addElement (const std::string &c, int q) throw (BadCharException) |
Add a character to the end of the list with quality. More... | |
void | addElement (size_t pos, const std::string &c) throw (BadCharException, IndexOutOfBoundsException) |
Add a character at a certain position in the list. More... | |
void | addElement (size_t pos, const std::string &c, int q) throw (BadCharException, IndexOutOfBoundsException) |
Add a character to a certain position in the list with quality. More... | |
void | addElement (int v) throw (BadIntException) |
Add a character to the end of the list. More... | |
void | addElement (int v, int q) throw (BadIntException) |
Add a character to the end of the list with quality. More... | |
void | addElement (size_t pos, int v) throw (BadIntException, IndexOutOfBoundsException) |
Add a character at a certain position in the list. More... | |
void | addElement (size_t pos, int v, int q) throw (BadCharException, IndexOutOfBoundsException) |
Add a character to a certain position in the list with quality. 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... | |
Setting/getting the comments associated to the sequence. | |
const Comments & | getComments () const |
Get the comments associated to this sequence. More... | |
void | setComments (const Comments &comments) |
Set the comments associated to this sequence. More... | |
Adjusting the size of the sequence. | |
virtual void | setContent (const std::string &sequence) throw (BadCharException) |
Set the whole content of the sequence. More... | |
void | setContent (const std::vector< int > &list) throw (BadIntException) |
Set the whole content of the list. More... | |
void | setContent (const std::vector< std::string > &list) throw (BadCharException) |
Set the whole content of the list. More... | |
virtual void | setToSizeR (size_t newSize) |
Set up the size of a sequence from the right side. More... | |
virtual void | setToSizeL (size_t newSize) |
Set up the size of a sequence from the left side. More... | |
Acting on the content of the list. | |
virtual const std::vector< int > & | getContent () const =0 |
Get the whole content of the list as a vector of int. More... | |
Edition methods. | |
virtual void | setElement (size_t pos, const std::string &c)=0 throw (BadCharException, IndexOutOfBoundsException) |
Set the element at position 'pos' to character 'c'. More... | |
virtual void | setElement (size_t pos, int v)=0 throw (BadIntException, IndexOutOfBoundsException) |
Set the element at position 'pos' to character 'v'. More... | |
virtual void | deleteElement (size_t pos)=0 throw (IndexOutOfBoundsException) |
Delete the element at position 'pos'. More... | |
virtual void | deleteElements (size_t pos, size_t len)=0 throw (IndexOutOfBoundsException) |
Delete the elements at position 'pos'. More... | |
virtual std::string | getChar (size_t pos) const =0 throw (IndexOutOfBoundsException) |
Get the element at position 'pos' as a character. More... | |
virtual int | getValue (size_t pos) const =0 throw (IndexOutOfBoundsException) |
Get the element at position 'pos' as an int. More... | |
Provide direct access to the list content. | |
| |
virtual const int & | operator[] (size_t i) const =0 |
Operator [] overloaded for quick access to a character in list. More... | |
virtual int & | operator[] (size_t i)=0 |
Operator [] overloaded for quick access to a character in list. More... | |
virtual void | shuffle ()=0 |
Randomly shuffle the content of the list, with linear complexity. More... | |
Protected Member Functions | |
void | propagateEvents (bool yn) |
bool | propagateEvents () const |
Protected Attributes | |
std::vector< int > | content_ |
The list content. More... | |
std::vector< SymbolListListener * > | listeners_ |
Contains the listeners. More... | |
Private Attributes | |
SequenceQuality * | qualScores_ |
A SequenceWithAnnotation class with quality scores attached.
This classes adds some usefull functions to handle quality scores.
Definition at line 218 of file SequenceWithQuality.h.
|
inline |
Build a new empty SequenceWithQuality.
alpha | A pointer to an Alphabet |
BadCharException | if a state is not alowed by the Alphabet |
Definition at line 238 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
Referenced by clone().
|
inline |
Build a new SequenceWithQuality from a std::string.
Build a new SequenceWithQuality and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
name | The name of the sequence |
sequence | The string representing the sequence |
alpha | A pointer to an Alphabet |
BadCharException | if a state is not alowed by the Alphabet |
Definition at line 259 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::string.
Build a new SequenceWithQuality and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
name | The name of the sequence |
sequence | The string representing the sequence |
comments | Comments to add to the sequence |
alpha | A pointer to an Alphabet |
BadCharException | if a state is not alowed by the Alphabet |
Definition at line 285 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::string.
Build a new SequenceWithQuality and assign quality scores from a vector of int.
name | The name of the sequence |
sequence | The string representing the sequence |
quality | The quality scores |
alpha | A pointer to an alphabet |
BadCharException | if a state is not alowed by the Alphabet |
DimensionException | if the number of quality values is not equal to the number of sequence states |
Definition at line 312 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::string.
Build a new SequenceWithQuality and assign quality scores from a vector of int.
name | The name of the sequence |
sequence | The string representing the sequence |
quality | The quality scores |
comments | Comments to add to the sequence |
alpha | A pointer to an alphabet |
BadCharException | if a state is not alowed by the Alphabet |
DimensionException | if the number of quality values is not equal to the number of sequence states |
Definition at line 342 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::vector<int>
Build a new SequenceWithQuality and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
name | The name of the sequence |
sequence | The sequence in int |
alpha | A pointer to an Alphabet |
BadIntException | if a state is not alowed by the Alphabet |
Definition at line 367 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::vector<int>
Build a new SequenceWithQuality and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
name | The name of the sequence |
sequence | The sequence in int |
comments | Comments to add to the sequence |
alpha | A pointer to an Alphabet |
BadIntException | if a state is not alowed by the Alphabet |
Definition at line 393 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::vector<int>
Build a new SequenceWithQuality and assign quality scores from a vector of int.
name | The name of the sequence |
sequence | The sequence in int |
quality | The quality scores |
alpha | A pointer to an Alphabet |
BadIntException | if a state is not alowed by the Alphabet |
DimensionException | if the number of quality values is not equal to the number of sequence states |
Definition at line 420 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality from a std::vector<int>
Build a new SequenceWithQuality and assign quality scores from a vector of int.
name | The name of the sequence |
sequence | The sequence in int |
quality | The quality scores |
comments | Comments to add to the sequence |
alpha | A pointer to an Alphabet |
BadIntException | if a state is not alowed by the Alphabet |
DimensionException | if the number of quality values is not equal to the number of sequence states |
Definition at line 450 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality.
Build a new SequenceWithQuality from a Sequence object and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
s | The Sequence object |
Definition at line 471 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inline |
Build a new SequenceWithQuality.
Build a new SequenceWithQuality from a Sequence object and set the quality scores from a vector of int.
s | The Sequence object |
sc | The quality scores |
DimensionException | if the number of quality values is not equal to the number of sequence states |
Definition at line 489 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::addAnnotation(), and qualScores_.
|
inlinevirtual |
Definition at line 505 of file SequenceWithQuality.h.
|
inline |
Definition at line 508 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::getAnnotation(), bpp::SequenceQuality::QUALITY_SCORE, and qualScores_.
|
inlinevirtualinherited |
Add a new annotation to the sequence.
anno | The annotation object to be added. Unless the annotation is shared, the annotation object will be owned by the sequence object, and will be copied and deleted when needed. |
Exception | If the annotation is not valid for this sequence. |
Definition at line 380 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::addSymbolListListener().
Referenced by bpp::SequenceWithAnnotationTools::createMaskAnnotation(), and SequenceWithQuality().
|
inlinevirtual |
Add a character to the end of the list.
c | The character to add, given as a string. |
Reimplemented from bpp::EdSymbolList.
Definition at line 684 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement().
|
inline |
Add a character to the end of the list with quality.
c | The element to add to the sequence |
q | The quality of this element |
BadCharException | if one of the character of the string is not in the Alphabet |
Definition at line 700 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement(), qualScores_, bpp::SequenceQuality::setScore(), and bpp::EdSymbolList::size().
|
inlinevirtual |
Add a character at a certain position in the list.
pos | The postion where to insert the element. |
c | The character to add, given as a string. |
Reimplemented from bpp::EdSymbolList.
Definition at line 708 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement().
|
inline |
Add a character to a certain position in the list with quality.
pos | The position where the element will be inserted |
c | The element to add to the sequence |
q | The quality of this element |
BadCharException | if one of the character of the string is not in the Alphabet |
IndexOutOfBoundsException | if pos is greater than the sequence size |
Definition at line 726 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement(), qualScores_, and bpp::SequenceQuality::setScore().
|
inlinevirtual |
Add a character to the end of the list.
v | The character to add, given as an int. |
Reimplemented from bpp::EdSymbolList.
Definition at line 734 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement().
|
inline |
Add a character to the end of the list with quality.
v | The element to add to the sequence |
q | The quality of this element |
BadIntException | if the value does not match the current Alphabet |
Definition at line 748 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement(), qualScores_, bpp::SequenceQuality::setScore(), and bpp::EdSymbolList::size().
|
inlinevirtual |
Add a character at a certain position in the list.
pos | The postion where to insert the element. |
v | The character to add, given as an int. |
Reimplemented from bpp::EdSymbolList.
Definition at line 755 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement().
|
inline |
Add a character to a certain position in the list with quality.
pos | The position where the element will be inserted |
v | The element to add to the sequence |
q | The quality of this element |
BadIntException | if the value does not match the current Alphabet |
IndexOutOfBoundsException | if pos is greater than the sequence size |
Definition at line 772 of file SequenceWithQuality.h.
References bpp::EdSymbolList::addElement(), qualScores_, and bpp::SequenceQuality::setScore().
|
inlinevirtualinherited |
Definition at line 657 of file SymbolList.h.
References bpp::EdSymbolList::listeners_.
Referenced by bpp::SequenceWithAnnotation::addAnnotation().
|
inlineprotectedvirtualinherited |
Definition at line 670 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireAfterSequenceChanged().
|
inlineprotectedvirtualinherited |
Definition at line 674 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireAfterSequenceDeleted().
|
inlineprotectedvirtualinherited |
Definition at line 672 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireAfterSequenceInserted().
|
inlineprotectedvirtualinherited |
Definition at line 676 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireAfterSequenceSubstituted().
|
inlinevirtual |
Append the specified content to the sequence.
content | The content to append to the sequence. |
BadIntException | If the content does not match the current alphabet. |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 593 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::append().
Referenced by append().
|
inline |
Append content with quality.
content | A vector of int to append to the sequence |
qualities | A vector of int to append to the qualities |
BadIntException | if one of the content int is not in the Alphabet |
DimensionException | if qualities does not have the same size as content |
Definition at line 610 of file SequenceWithQuality.h.
References append(), bpp::SequenceQuality::getSize(), qualScores_, and bpp::SequenceQuality::setScores().
|
inlinevirtual |
Append the specified content to the sequence.
content | The content to append to the sequence. |
BadCharException | If the content does not match the current alphabet. |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 623 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::append().
|
inline |
Append content with quality.
content | A vector of string to append to the sequence |
qualities | A vector of int to append to the qualities |
BadCharException | if one of the content string is not in the Alphabet |
DimensionException | if qualities does not have the same size as content |
Definition at line 640 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::append(), bpp::SequenceQuality::getSize(), qualScores_, and bpp::SequenceQuality::setScores().
|
inlinevirtual |
Append the specified content to the sequence.
content | The content to append to the sequence. |
BadCharException | If the content does not match the current alphabet. |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 653 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::append().
|
inline |
Append content with quality.
content | A string to append to the sequence |
qualities | A vector of int to append to the qualities |
BadCharException | if one of the character of the string is not in the Alphabet |
DimensionException | if qualities does not have the same size as content |
Definition at line 670 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::append(), bpp::EdSymbolList::getAlphabet(), bpp::SequenceQuality::getSize(), bpp::Alphabet::getStateCodingSize(), qualScores_, and bpp::SequenceQuality::setScores().
|
inlineprotectedvirtualinherited |
Definition at line 669 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireBeforeSequenceChanged().
|
inlineprotectedvirtualinherited |
Definition at line 673 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireBeforeSequenceDeleted().
|
inlineprotectedvirtualinherited |
Definition at line 671 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireBeforeSequenceInserted().
|
inlineprotectedvirtualinherited |
Definition at line 675 of file SymbolList.h.
Referenced by bpp::EdSymbolList::fireBeforeSequenceSubstituted().
|
inlinevirtual |
Reimplemented from bpp::SequenceWithAnnotation.
Definition at line 530 of file SequenceWithQuality.h.
References SequenceWithQuality().
Referenced by bpp::SequenceWithQualityTools::invert(), and bpp::SequenceWithQualityTools::removeGaps().
|
pure virtualinherited |
Delete the element at position 'pos'.
pos | The position of the element to delete. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SequenceTools::getCDS(), bpp::SequenceTools::removeGaps(), and bpp::VectorSiteContainer::removeSequence().
|
virtualinherited |
Delete the element at position 'pos'.
pos | The position of the element to delete. |
Implements bpp::SymbolList.
Definition at line 369 of file SymbolList.cpp.
|
pure virtualinherited |
Delete the elements at position 'pos'.
pos | The position of the first element to delete. |
len | The length of the region to delete. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
|
virtualinherited |
Delete the elements at position 'pos'.
pos | The position of the first element to delete. |
len | The length of the region to delete. |
Implements bpp::SymbolList.
Definition at line 381 of file SymbolList.cpp.
|
inlineprotectedinherited |
Definition at line 685 of file SymbolList.h.
References bpp::EdSymbolList::afterSequenceChanged(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
|
inlineprotectedinherited |
Definition at line 713 of file SymbolList.h.
References bpp::EdSymbolList::afterSequenceDeleted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
Referenced by bpp::SequenceWithAnnotation::setToSizeL(), and bpp::SequenceWithAnnotation::setToSizeR().
|
inlineprotectedinherited |
Definition at line 699 of file SymbolList.h.
References bpp::EdSymbolList::afterSequenceInserted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
Referenced by bpp::SequenceWithAnnotation::setToSizeL(), and bpp::SequenceWithAnnotation::setToSizeR().
|
inlineprotectedinherited |
Definition at line 727 of file SymbolList.h.
References bpp::EdSymbolList::afterSequenceSubstituted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
|
inlineprotectedinherited |
Definition at line 678 of file SymbolList.h.
References bpp::EdSymbolList::beforeSequenceChanged(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
|
inlineprotectedinherited |
Definition at line 706 of file SymbolList.h.
References bpp::EdSymbolList::beforeSequenceDeleted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
Referenced by bpp::SequenceWithAnnotation::setToSizeL(), and bpp::SequenceWithAnnotation::setToSizeR().
|
inlineprotectedinherited |
Definition at line 692 of file SymbolList.h.
References bpp::EdSymbolList::beforeSequenceInserted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
Referenced by bpp::SequenceWithAnnotation::setToSizeL(), and bpp::SequenceWithAnnotation::setToSizeR().
|
inlineprotectedinherited |
Definition at line 720 of file SymbolList.h.
References bpp::EdSymbolList::beforeSequenceSubstituted(), bpp::EdSymbolList::listeners_, and bpp::EdSymbolList::propagateEvents_.
|
pure virtualinherited |
Get the alphabet associated to the list.
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::SymbolListTools::changeUnresolvedCharactersToGaps(), bpp::SequenceTools::findFirstOf(), bpp::SequenceTools::getCDS(), bpp::SymbolListTools::getCounts(), bpp::SequenceTools::getNumberOfCompleteSites(), bpp::SequenceTools::getNumberOfSites(), bpp::SequenceTools::getNumberOfUnresolvedSites(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::SequenceTools::getSequenceWithCompleteSites(), bpp::SequenceTools::getSequenceWithoutGaps(), bpp::SequenceTools::invertComplement(), bpp::BasicSymbolList::operator=(), bpp::EdSymbolList::operator=(), and bpp::SequenceTools::removeGaps().
|
inlinevirtualinherited |
Get the alphabet associated to the list.
Implements bpp::SymbolList.
Definition at line 599 of file SymbolList.h.
References bpp::EdSymbolList::alphabet_.
Referenced by append(), bpp::EdSymbolList::operator=(), bpp::SequenceWithQualityTools::removeGaps(), bpp::SequenceWithAnnotation::setToSizeL(), and bpp::SequenceWithAnnotation::setToSizeR().
|
inlinevirtualinherited |
Definition at line 397 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::getListener(), bpp::EdSymbolList::getNumberOfListeners(), and bpp::SequenceAnnotation::getType().
Referenced by operator=(), and SequenceWithQuality().
|
inlinevirtualinherited |
Definition at line 407 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::getListener(), bpp::EdSymbolList::getNumberOfListeners(), and bpp::SequenceAnnotation::getType().
|
virtualinherited |
Definition at line 244 of file SequenceWithAnnotation.cpp.
References bpp::EdSymbolList::getListener(), bpp::EdSymbolList::getNumberOfListeners(), and bpp::SequenceAnnotation::getType().
|
pure virtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SiteContainerTools::resolveDottedAlignment().
|
virtualinherited |
Get the element at position 'pos' as a character.
pos | The position of the character to retrieve. |
Implements bpp::SymbolList.
Definition at line 354 of file SymbolList.cpp.
|
inlinevirtualinherited |
Get the comments associated to this sequence.
Implements bpp::Sequence.
Definition at line 290 of file SequenceWithAnnotation.h.
References bpp::SequenceWithAnnotation::comments_.
Referenced by bpp::SequenceWithAnnotation::operator=().
|
pure virtualinherited |
Get the whole content of the list as a vector of int.
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SequenceWithQualityTools::complement(), bpp::AbstractSequenceContainer::getContent(), bpp::SymbolListTools::getCounts(), bpp::BasicSymbolList::operator=(), bpp::EdSymbolList::operator=(), bpp::SequenceWithQualityTools::reverseTranscript(), and bpp::SequenceWithQualityTools::transcript().
|
inlinevirtualinherited |
Get the whole content of the list as a vector of int.
Implements bpp::SymbolList.
Definition at line 603 of file SymbolList.h.
References bpp::EdSymbolList::content_.
Referenced by bpp::SequenceWithQualityTools::invert(), and bpp::EdSymbolList::operator=().
|
inlinevirtualinherited |
Definition at line 647 of file SymbolList.h.
References bpp::EdSymbolList::listeners_.
Referenced by bpp::SequenceWithAnnotation::getAnnotation(), bpp::SequenceWithAnnotation::getAnnotationTypes(), and bpp::SequenceWithAnnotation::hasAnnotation().
|
inlinevirtualinherited |
Definition at line 652 of file SymbolList.h.
References bpp::EdSymbolList::listeners_.
|
inlinevirtualinherited |
Get the name of this sequence.
Implements bpp::Sequence.
Definition at line 268 of file SequenceWithAnnotation.h.
References bpp::SequenceWithAnnotation::name_.
Referenced by bpp::SequenceWithAnnotation::operator=().
|
inlinevirtualinherited |
Definition at line 645 of file SymbolList.h.
References bpp::EdSymbolList::listeners_.
Referenced by bpp::SequenceWithAnnotation::getAnnotation(), bpp::SequenceWithAnnotation::getAnnotationTypes(), and bpp::SequenceWithAnnotation::hasAnnotation().
|
inline |
Get the whole quality scores.
Definition at line 589 of file SequenceWithQuality.h.
References bpp::SequenceQuality::getScores(), and qualScores_.
Referenced by bpp::SequenceWithQualityTools::invert(), and bpp::SequenceWithQualityTools::removeGaps().
|
inline |
Get the quality score.
pos | The position where the quality is read |
IndexOutOfBoundsException | if pos is greater than the sequence size |
Definition at line 564 of file SequenceWithQuality.h.
References bpp::SequenceQuality::getSize(), and qualScores_.
|
pure virtualinherited |
Get the element at position 'pos' as an int.
pos | The position of the character to retrieve. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SequenceTools::findFirstOf(), bpp::SequenceTools::invert(), and bpp::SequenceTools::invertComplement().
|
virtualinherited |
Get the element at position 'pos' as an int.
pos | The position of the character to retrieve. |
Implements bpp::SymbolList.
Definition at line 434 of file SymbolList.cpp.
|
inlinevirtualinherited |
Definition at line 386 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::getListener(), bpp::EdSymbolList::getNumberOfListeners(), and bpp::SequenceAnnotation::getType().
|
virtualinherited |
Merge a sequence with the current one.
Sequences must have the same name and alphabets. Only first sequence's commentaries are kept. Annotations that could not be merged will not be added in the concatenated sequence. See the documentation of each annotation class for more details.
swa | The sequence to merge with. |
AlphabetMismatchException | If the two alphabets do not match. |
Exception | If the sequence names do not match. |
Definition at line 257 of file SequenceWithAnnotation.cpp.
References bpp::SequenceAnnotation::clone(), bpp::SequenceAnnotation::init(), and bpp::SequenceAnnotation::merge().
|
inline |
Definition at line 514 of file SequenceWithQuality.h.
References bpp::SequenceWithAnnotation::getAnnotation(), bpp::SequenceWithAnnotation::operator=(), bpp::SequenceQuality::QUALITY_SCORE, and qualScores_.
|
pure virtualinherited |
Operator [] overloaded for quick access to a character in list.
i | The position to retrieve. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
|
pure virtualinherited |
Operator [] overloaded for quick access to a character in list.
i | The position to retrieve. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
i | The position to retrieve. |
Implements bpp::SymbolList.
Definition at line 631 of file SymbolList.h.
References bpp::EdSymbolList::content_.
|
inlinevirtualinherited |
Operator [] overloaded for quick access to a character in list.
i | The position to retrieve. |
Implements bpp::SymbolList.
Definition at line 633 of file SymbolList.h.
References bpp::EdSymbolList::content_.
|
inlineprotectedinherited |
Definition at line 736 of file SymbolList.h.
References bpp::EdSymbolList::propagateEvents_.
|
inlineprotectedinherited |
Definition at line 737 of file SymbolList.h.
References bpp::EdSymbolList::propagateEvents_.
|
inlinevirtualinherited |
Definition at line 661 of file SymbolList.h.
References bpp::SymbolListListener::isRemovable(), and bpp::EdSymbolList::listeners_.
|
inlinevirtualinherited |
Set the comments associated to this sequence.
comments | The new comments of the sequence. |
Implements bpp::Sequence.
Definition at line 297 of file SequenceWithAnnotation.h.
References bpp::SequenceWithAnnotation::comments_.
|
virtualinherited |
Set the whole content of the sequence.
sequence | The new content of the sequence. |
Implements bpp::Sequence.
Definition at line 143 of file SequenceWithAnnotation.cpp.
References bpp::StringSequenceTools::codeSequence().
Referenced by bpp::SequenceWithQualityTools::removeGaps().
|
inlinevirtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implements bpp::Sequence.
Definition at line 315 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::setContent().
|
inlinevirtualinherited |
Set the whole content of the list.
list | The new content of the list. |
Implements bpp::Sequence.
Definition at line 319 of file SequenceWithAnnotation.h.
References bpp::EdSymbolList::setContent().
|
pure virtualinherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element, given as a string. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SequenceTools::invert(), and bpp::SequenceTools::invertComplement().
|
pure virtualinherited |
Set the element at position 'pos' to character 'v'.
pos | The position of the character to set. |
v | The value of the element, given as an int. |
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
|
virtualinherited |
Set the element at position 'pos' to character 'c'.
pos | The position of the character to set. |
c | The value of the element, given as a string. |
Implements bpp::SymbolList.
Definition at line 342 of file SymbolList.cpp.
|
virtualinherited |
Set the element at position 'pos' to character 'v'.
pos | The position of the character to set. |
v | The value of the element, given as an int. |
Implements bpp::SymbolList.
Definition at line 420 of file SymbolList.cpp.
|
inlinevirtualinherited |
Set the name of this sequence.
name | The new name of the sequence. |
Implements bpp::Sequence.
Definition at line 275 of file SequenceWithAnnotation.h.
References bpp::SequenceWithAnnotation::name_.
|
inline |
Set the whole quality scores.
quality | The vector of quality scores |
DimensionException | if the quality vector does not feet the sequence size |
Definition at line 578 of file SequenceWithQuality.h.
References bpp::SequenceQuality::getSize(), qualScores_, and bpp::SequenceQuality::setScores().
Referenced by bpp::PhredPhd::nextSequence(), and bpp::SequenceWithQualityTools::removeGaps().
|
inline |
Set the quality score.
pos | The position where the quality must be set |
quality | The quality value |
IndexOutOfBoundsException | if pos is greater than the sequence size |
Definition at line 547 of file SequenceWithQuality.h.
References qualScores_, and bpp::SequenceQuality::setScore().
|
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. |
Implements bpp::Sequence.
Definition at line 180 of file SequenceWithAnnotation.cpp.
References bpp::EdSymbolList::content_, bpp::EdSymbolList::fireAfterSequenceDeleted(), bpp::EdSymbolList::fireAfterSequenceInserted(), bpp::EdSymbolList::fireBeforeSequenceDeleted(), bpp::EdSymbolList::fireBeforeSequenceInserted(), bpp::EdSymbolList::getAlphabet(), and bpp::Alphabet::getGapCharacterCode().
|
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. |
Implements bpp::Sequence.
Definition at line 155 of file SequenceWithAnnotation.cpp.
References bpp::EdSymbolList::content_, bpp::EdSymbolList::fireAfterSequenceDeleted(), bpp::EdSymbolList::fireAfterSequenceInserted(), bpp::EdSymbolList::fireBeforeSequenceDeleted(), bpp::EdSymbolList::fireBeforeSequenceInserted(), bpp::EdSymbolList::getAlphabet(), and bpp::Alphabet::getGapCharacterCode().
|
pure virtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
|
inlinevirtualinherited |
Randomly shuffle the content of the list, with linear complexity.
Implements bpp::SymbolList.
Definition at line 635 of file SymbolList.h.
References bpp::EdSymbolList::content_.
|
pure virtualinherited |
Get the number of elements in the list.
Implemented in bpp::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::SymbolListTools::changeGapsToUnknownCharacters(), bpp::SymbolListTools::changeUnresolvedCharactersToGaps(), bpp::SequenceTools::findFirstOf(), bpp::SiteContainerTools::getAlignmentPositions(), bpp::SequenceTools::getCDS(), bpp::GeneticCode::getCodingSequence(), bpp::SymbolListTools::getFrequencies(), bpp::SequenceTools::getNumberOfCompleteSites(), bpp::SequenceTools::getNumberOfSites(), bpp::SequenceTools::getNumberOfUnresolvedSites(), bpp::SequenceTools::getPutativeHaplotypes(), bpp::SiteContainerTools::getSequencePositions(), bpp::SequenceTools::getSequenceWithCompleteSites(), bpp::SequenceTools::getSequenceWithoutGaps(), bpp::SequenceMask::init(), bpp::SequenceQuality::init(), bpp::SequenceTools::invert(), bpp::SequenceTools::invertComplement(), bpp::SequenceTools::removeGaps(), bpp::SiteContainerTools::resolveDottedAlignment(), bpp::SequenceContainerTools::sequencesHaveTheSameLength(), and bpp::SequenceWalker::SequenceWalker().
|
inlinevirtualinherited |
Get the number of elements in the list.
Implements bpp::SymbolList.
Definition at line 601 of file SymbolList.h.
References bpp::EdSymbolList::content_.
Referenced by addElement(), bpp::SequenceMask::isValidWith(), bpp::SequenceQuality::isValidWith(), and bpp::SequenceWithQualityTools::removeGaps().
|
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::EdSymbolList, and bpp::BasicSymbolList.
Referenced by bpp::AbstractSequenceContainer::toString().
|
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::SymbolList.
Definition at line 314 of file SymbolList.cpp.
References bpp::EdSymbolList::alphabet_, bpp::EdSymbolList::content_, and bpp::StringSequenceTools::decodeSequence().
|
protectedinherited |
The list content.
Definition at line 518 of file SymbolList.h.
Referenced by bpp::EdSymbolList::getContent(), bpp::EdSymbolList::operator=(), bpp::EdSymbolList::operator[](), bpp::SequenceWithAnnotation::setToSizeL(), bpp::SequenceWithAnnotation::setToSizeR(), bpp::EdSymbolList::shuffle(), bpp::EdSymbolList::size(), and bpp::EdSymbolList::toString().
|
protectedinherited |
Contains the listeners.
Definition at line 523 of file SymbolList.h.
Referenced by bpp::EdSymbolList::addSymbolListListener(), bpp::EdSymbolList::EdSymbolList(), bpp::EdSymbolList::fireAfterSequenceChanged(), bpp::EdSymbolList::fireAfterSequenceDeleted(), bpp::EdSymbolList::fireAfterSequenceInserted(), bpp::EdSymbolList::fireAfterSequenceSubstituted(), bpp::EdSymbolList::fireBeforeSequenceChanged(), bpp::EdSymbolList::fireBeforeSequenceDeleted(), bpp::EdSymbolList::fireBeforeSequenceInserted(), bpp::EdSymbolList::fireBeforeSequenceSubstituted(), bpp::EdSymbolList::getListener(), bpp::EdSymbolList::getNumberOfListeners(), bpp::EdSymbolList::operator=(), bpp::EdSymbolList::removeSymbolListListener(), and bpp::EdSymbolList::~EdSymbolList().
|
private |
Definition at line 222 of file SequenceWithQuality.h.
Referenced by addElement(), append(), getQualities(), getQuality(), operator=(), SequenceWithQuality(), setQualities(), and setQuality().