Commit e258bfc1 authored by Mikael Salson's avatar Mikael Salson

WindowsStorage: getReads() can't return a reference to a list anymore.

Before the list was actually stored. Now the list of reads is not stored
anymore.  There are several lists of (some) reads, and for getReads() a single
list is computed from those lists.  We should see if it causes some slow down
but we rarely call getReads() and we don't have anymore to sample sequences.
parent 153ccb76
......@@ -53,7 +53,7 @@ size_t WindowsStorage::getNbReads(junction window) {
return seqs_by_window[window].getNbInserted();
}
list<Sequence> &WindowsStorage::getReads(junction window) {
list<Sequence> WindowsStorage::getReads(junction window) {
return seqs_by_window[window].getReads();
}
......@@ -84,7 +84,7 @@ Sequence WindowsStorage::getRepresentative(junction window,
list<Sequence> WindowsStorage::getSample(junction window, size_t nb_sampled,
size_t nb_buckets) {
list<Sequence> &reads = getReads(window);
list<Sequence> reads = getReads(window);
return SequenceSampler(reads).getLongest(nb_sampled, nb_buckets);
}
......
......@@ -72,7 +72,7 @@ class WindowsStorage {
/**
* @return the list of reads supporting a given window
*/
list<Sequence> &getReads(junction window);
list<Sequence> getReads(junction window);
/**
* @param window: the window shared by all the sequences
......
......@@ -1254,7 +1254,7 @@ int main (int argc, char **argv)
if (output_sequences_by_cluster) // -a option, output all sequences
{
list<Sequence> &sequences = windowsStorage->getReads(it->first);
list<Sequence> sequences = windowsStorage->getReads(it->first);
for (list<Sequence>::const_iterator itt = sequences.begin(); itt != sequences.end(); ++itt)
{
......
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