Commit 353497b7 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/representative.cpp: do not stop representative computation to correctly...

core/representative.cpp: do not stop representative computation to correctly compute average quality

This commit may affect the global execution time.
parent 38a86d07
......@@ -111,7 +111,8 @@ void KmerRepresentativeComputer::compute() {
for (size_t seq = 1; seq <= sequences.size() && seq <= seq_index_longest_run + stability_limit ; seq++) {
Sequence sequence = rc.getithBest(seq);
if (sequence.sequence.size() <= length_longest_run) {
// Break as soon as the sequences are too small
if (sequence.sequence.size() < required.size()) {
break;
}
......@@ -131,6 +132,12 @@ void KmerRepresentativeComputer::compute() {
sequence_used_for_quality++;
}
// When sequences are smaller than length_longest_run,
// they are used only for the above quality computation
if (sequence.sequence.size() <= length_longest_run) {
continue;
}
size_t pos_end_required = pos_required + required.length();
vector<Kmer> counts = index->getResults(sequence.sequence);
......
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