bpp-seq3  3.0.0
SequenceWithQuality.cpp
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: The Bio++ Development Group
2 //
3 // SPDX-License-Identifier: CECILL-2.1
4 
6 
7 #include "SequenceWithQuality.h"
8 
9 using namespace bpp;
10 
11 #include <string>
12 #include <iostream>
13 
14 using namespace std;
15 
16 const string SequenceQuality::QUALITY_SCORE = "Quality score";
18 
19 /******************************************************************************/
20 
22 {
23  qualScores_.clear();
24  qualScores_.insert(qualScores_.begin(), event.getCoreSymbolList()->size(), DEFAULT_QUALITY_VALUE);
25 }
26 
27 /******************************************************************************/
28 
30 {
31  qualScores_.insert(
32  qualScores_.begin() + static_cast<ptrdiff_t>(event.getPosition()),
33  event.getLength(), DEFAULT_QUALITY_VALUE);
34 }
35 
36 /******************************************************************************/
37 
39 {
40  qualScores_.erase(
41  qualScores_.begin() + static_cast<ptrdiff_t>(event.getPosition()),
42  qualScores_.begin() + static_cast<ptrdiff_t>(event.getPosition() + event.getLength()));
43 }
44 
45 /******************************************************************************/
virtual size_t getPosition() const
virtual size_t getLength() const
virtual TemplateCoreSymbolListInterface< T > * getCoreSymbolList()
virtual size_t getPosition() const
virtual size_t getLength() const
void afterSequenceChanged(const IntSymbolListEditionEvent &event) override
static const std::string QUALITY_SCORE
void afterSequenceInserted(const IntSymbolListInsertionEvent &event) override
void afterSequenceDeleted(const IntSymbolListDeletionEvent &event) override
static const int DEFAULT_QUALITY_VALUE
This alphabet is used to deal NumericAlphabet.