Commit ac03a391 authored by Cyprien Borée's avatar Cyprien Borée Committed by Mikaël Salson

core/read_storage: Not all bins may be built

See #3393
parent 62133d1d
......@@ -17,7 +17,8 @@ BinReadStorage::BinReadStorage()
nb_inserted(0), nb_stored(0), smallest_bin_not_empty(~0),label(),inited(false) {}
void BinReadStorage::init(size_t nb_bins, size_t max_score, const VirtualReadScore *vrs, bool no_list) {
__init(nb_bins, max_score, vrs, no_list);
this->max_bins = nb_bins;
__init(0, max_score, vrs, no_list);
void BinReadStorage::__init(size_t nb_bins, size_t max_score, const VirtualReadScore *vrs, bool no_list) {
......@@ -68,6 +68,7 @@ class VirtualReadStorage {
class BinReadStorage: public VirtualReadStorage {
size_t max_bins;
size_t nb_bins;
list<Sequence> *bins;
double *score_bins;
......@@ -87,6 +88,7 @@ public:
* nb_bins are created and the maximal score for the reads that will be added is assumed
* to be max_score. If higher score are met, they are put in the nb_bins+1 bin.
* The class doesn't destruct the VirtualReadScore. It is the responsability of the caller.
* May not build as many as nb_bins to save memory.
* @pre all scores must be >= 0
* @param no_list: don't create a list (useful for storing only stats,
* false by default: lists are created). If the option is set to true, the
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