5 #ifndef BPP_SEQ_SEQUENCEWITHQUALITYTOOLS_H
6 #define BPP_SEQ_SEQUENCEWITHQUALITYTOOLS_H
46 if (end < begin || end >= sequence.
size())
48 std::vector<int> content(end - begin + 1);
49 std::vector<int> scores(end - begin + 1);
50 for (
size_t i = 0; i <= end - begin; ++i)
52 content[i] = sequence[begin + i];
55 output.
append(content, scores);
69 auto seq = std::make_unique<SequenceWithQuality>(alphaPtr);
70 seq->setName(sequence.
getName());
72 subseq(sequence, begin, end, *seq);
90 static std::unique_ptr<SequenceWithQuality>
concatenate(
103 static std::unique_ptr<SequenceWithQuality>
complement(
115 static std::unique_ptr<SequenceWithQuality>
transcript(
140 static std::unique_ptr<SequenceWithQuality>
invert(
const std::string & getName() const override
Get the name of this sequence.
virtual std::shared_ptr< const Alphabet > getAlphabet() const =0
Get the alphabet associated to the list.
virtual size_t size() const =0
Get the number of elements in the list.
This alphabet is used to deal with DNA sequences.
Replication between to nucleic acids.
This alphabet is used to deal with RNA sequences.
A SequenceWithAnnotation class with quality scores attached.
int getQuality(size_t pos) const
Get the quality score.
virtual void append(const std::vector< int > &content, const std::vector< int > &qualities)
Append content with quality.
std::string toString(T t)
This alphabet is used to deal NumericAlphabet.