Commit f3cab656 authored by Mathieu Giraud's avatar Mathieu Giraud

core/windows.cpp: representative computation works with all labeled windows.

When there are labeled windows, some kept windows may have, on purpose,
fewer reads than the '-r' threshold.
Previously an exception was launched in these cases. This is fixed.
parent ba12fa61
......@@ -80,13 +80,13 @@ KmerRepresentativeComputer WindowsStorage::getRepresentativeComputer(junction wi
= getSample(window,nb_sampled, nb_buckets);
KmerRepresentativeComputer repComp(auditioned_sequences, seed);
repComp.setMinCover((windows_labels.find(window) == windows_labels.end()) ? min_cover : 1);
// We should always have a representative, because
// We should always have a representative, because either the junction is labelled (thus setMinCover(1)), or:
// - there is at least min('min_reads_clone', 'max_auditioned') sequences in auditioned_sequences
// - and 'min_cover' = min('min_reads_clone', 'max_auditioned')
// - and these sequence are at least as long as the seed
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