Une MAJ de sécurité est nécessaire sur notre version actuelle. Elle sera effectuée lundi 02/08 entre 12h30 et 13h. L'interruption de service devrait durer quelques minutes (probablement moins de 5 minutes).

Commit 06cfbd27 authored by Mikaël Salson's avatar Mikaël Salson Committed by Mathieu Giraud
Browse files

read_score.cpp: Make sure quality is ok.

parent 345f0f6a
......@@ -77,7 +77,9 @@ ReadQualityScore::~ReadQualityScore(){}
float ReadQualityScore::getScore(const Sequence &sequence) const {
size_t *qualities = (size_t *)calloc(MAX_QUALITY, sizeof(size_t));
for (size_t i = 0; i < sequence.quality.size(); i++) {
qualities[(sequence.quality[i]) - '!']++;
int current_quality = (sequence.quality[i]) - '!';
assert(current_quality < MAX_QUALITY);
qualities[current_quality]++;
}
int max_percentile = (int) round(sequence.quality.size()*1. / 100);
int percent_quality = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment