bpp-seq3
3.0.0
|
The SequenceQuality class. More...
#include <Bpp/Seq/SequenceWithQuality.h>
Public Member Functions | |
void | init (const Sequence &seq) override |
const std::string & | getType () const override |
bool | isValidWith (const SequenceWithAnnotation &sequence, bool throwException=true) const override |
Test is the annotation is valid for a given sequence. More... | |
bool | isRemovable () const override |
bool | isShared () const override |
void | beforeSequenceChanged (const IntSymbolListEditionEvent &event) override |
void | afterSequenceChanged (const IntSymbolListEditionEvent &event) override |
void | beforeSequenceInserted (const IntSymbolListInsertionEvent &event) override |
void | afterSequenceInserted (const IntSymbolListInsertionEvent &event) override |
void | beforeSequenceDeleted (const IntSymbolListDeletionEvent &event) override |
void | afterSequenceDeleted (const IntSymbolListDeletionEvent &event) override |
void | beforeSequenceSubstituted (const IntSymbolListSubstitutionEvent &event) override |
void | afterSequenceSubstituted (const IntSymbolListSubstitutionEvent &event) override |
size_t | getSize () const |
const int & | operator[] (size_t i) const |
int & | operator[] (size_t i) |
void | setScores (const std::vector< int > &scores) |
const std::vector< int > & | getScores () const |
void | setScore (size_t pos, int score) |
void | setScores (size_t pos, const std::vector< int > &scores) |
bool | merge (const SequenceAnnotation &anno) override |
Merge the input annotation with the current one. More... | |
std::unique_ptr< SequenceAnnotation > | getPartAnnotation (size_t pos, size_t len) const override |
virtual void | beforeSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0 |
virtual void | afterSequenceChanged (const CoreSymbolListEditionEvent< T > &event)=0 |
virtual void | beforeSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0 |
virtual void | afterSequenceInserted (const CoreSymbolListInsertionEvent< T > &event)=0 |
virtual void | beforeSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0 |
virtual void | afterSequenceDeleted (const CoreSymbolListDeletionEvent< T > &event)=0 |
virtual void | beforeSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0 |
virtual void | afterSequenceSubstituted (const CoreSymbolListSubstitutionEvent< T > &event)=0 |
Constructors | |
SequenceQuality (size_t size=0, bool removable=true) | |
Build a new SequenceQuality object. More... | |
SequenceQuality (const std::vector< int > &quality, bool removable=true) | |
Build a new SequenceQuality object. More... | |
Destructor | |
virtual | ~SequenceQuality () |
The Clonable interface | |
SequenceQuality * | clone () const override |
Static Public Attributes | |
static const std::string | QUALITY_SCORE = "Quality score" |
static const int | DEFAULT_QUALITY_VALUE = 20 |
Private Attributes | |
bool | removable_ |
std::vector< int > | qualScores_ |
The SequenceQuality class.
This is a sequence with quality score associated to each element. The score is a signed int value that can represent the phred or the Solexa quality score for nucleic sequence.
Definition at line 30 of file SequenceWithQuality.h.
|
inline |
Build a new SequenceQuality object.
Build a new SequenceQuality object and set the quality scores to the default value DEFAULT_QUALITY_VALUE.
size | The size of the sequence. |
removable | Tell if this listener can be removed by the user. |
Definition at line 56 of file SequenceWithQuality.h.
Referenced by clone(), and getPartAnnotation().
|
inline |
Build a new SequenceQuality object.
Build a new SequenceQuality and assign quality scores from a vector of int.
quality | The quality scores |
removable | Tell if this listener can be removed by the user. |
Definition at line 70 of file SequenceWithQuality.h.
|
inlinevirtual |
Definition at line 81 of file SequenceWithQuality.h.
|
pure virtualinherited |
|
override |
Definition at line 21 of file SequenceWithQuality.cpp.
References bpp::CoreSymbolListEditionEvent< T >::getCoreSymbolList().
|
pure virtualinherited |
|
override |
Definition at line 38 of file SequenceWithQuality.cpp.
References bpp::CoreSymbolListDeletionEvent< T >::getLength(), and bpp::CoreSymbolListDeletionEvent< T >::getPosition().
|
pure virtualinherited |
|
override |
Definition at line 29 of file SequenceWithQuality.cpp.
References bpp::CoreSymbolListInsertionEvent< T >::getLength(), and bpp::CoreSymbolListInsertionEvent< T >::getPosition().
|
pure virtualinherited |
|
inlineoverride |
Definition at line 115 of file SequenceWithQuality.h.
|
pure virtualinherited |
|
inlineoverride |
Definition at line 108 of file SequenceWithQuality.h.
|
pure virtualinherited |
|
inlineoverride |
Definition at line 112 of file SequenceWithQuality.h.
|
pure virtualinherited |
|
inlineoverride |
Definition at line 110 of file SequenceWithQuality.h.
|
pure virtualinherited |
|
inlineoverride |
Definition at line 114 of file SequenceWithQuality.h.
|
inlineoverridevirtual |
Implements bpp::SequenceAnnotation.
Definition at line 88 of file SequenceWithQuality.h.
References SequenceQuality().
|
inlineoverridevirtual |
pos | Starting point of the region. |
len | The length of the region, in number of positions. |
Implements bpp::SequenceAnnotation.
Definition at line 162 of file SequenceWithQuality.h.
References qualScores_, removable_, and SequenceQuality().
|
inline |
Definition at line 132 of file SequenceWithQuality.h.
References qualScores_.
Referenced by merge().
|
inline |
Definition at line 117 of file SequenceWithQuality.h.
References qualScores_.
|
inlineoverridevirtual |
Implements bpp::SequenceAnnotation.
Definition at line 98 of file SequenceWithQuality.h.
References QUALITY_SCORE.
|
inlineoverridevirtual |
Creates a default annotation according to a given sequence.
seq | The template sequence (typically the one with which the annotation will be attached). |
Implements bpp::SequenceAnnotation.
Definition at line 92 of file SequenceWithQuality.h.
References DEFAULT_QUALITY_VALUE, qualScores_, and bpp::AbstractTemplateSymbolList< T >::size().
|
inlineoverridevirtual |
Implements bpp::CoreSymbolListListener< T >.
Definition at line 106 of file SequenceWithQuality.h.
References removable_.
|
inlineoverridevirtual |
Implements bpp::CoreSymbolListListener< T >.
Definition at line 107 of file SequenceWithQuality.h.
|
inlineoverridevirtual |
Test is the annotation is valid for a given sequence.
sequence | The sequence to be validated against. |
throwException | If set to yes, throw an exception if the sequence is not valid. |
Implements bpp::SequenceAnnotation.
Definition at line 100 of file SequenceWithQuality.h.
References qualScores_, and bpp::CruxSymbolListInterface::size().
|
inlineoverridevirtual |
Merge the input annotation with the current one.
anno | The annotation to fuse. |
Implements bpp::SequenceAnnotation.
Definition at line 148 of file SequenceWithQuality.h.
References bpp::VectorTools::append(), getScores(), and qualScores_.
|
inline |
Definition at line 120 of file SequenceWithQuality.h.
References qualScores_.
|
inline |
Definition at line 119 of file SequenceWithQuality.h.
References qualScores_.
|
inline |
Definition at line 134 of file SequenceWithQuality.h.
References qualScores_, and bpp::TextTools::toString().
|
inline |
Definition at line 122 of file SequenceWithQuality.h.
References qualScores_.
|
inline |
Definition at line 141 of file SequenceWithQuality.h.
References qualScores_, and bpp::TextTools::toString().
|
static |
Definition at line 39 of file SequenceWithQuality.h.
Referenced by init().
|
static |
Definition at line 38 of file SequenceWithQuality.h.
Referenced by getType(), bpp::SequenceWithQuality::operator=(), and bpp::SequenceWithQuality::SequenceWithQuality().
|
private |
Definition at line 35 of file SequenceWithQuality.h.
Referenced by getPartAnnotation(), getScores(), getSize(), init(), isValidWith(), merge(), operator[](), setScore(), and setScores().
|
private |
Definition at line 34 of file SequenceWithQuality.h.
Referenced by getPartAnnotation(), and isRemovable().