Commit a28928da authored by Mikael Salson's avatar Mikael Salson

WindowsStorage: getSample() don't do anything if it is not needed.

There is no reason to call the sequence sampler if we already don't have more
sequences than what we would require for the sample.
parent e258bfc1
......@@ -85,6 +85,8 @@ Sequence WindowsStorage::getRepresentative(junction window,
list<Sequence> WindowsStorage::getSample(junction window, size_t nb_sampled,
size_t nb_buckets) {
list<Sequence> reads = getReads(window);
if (reads.size() <= nb_sampled)
return reads;
return SequenceSampler(reads).getLongest(nb_sampled, nb_buckets);
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