Skip to content

Commit 469ee08

Browse files
committed
Fix a bug with read id aggregation.
1 parent 4c67bab commit 469ee08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aggregator.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ void Aggregator::load_sequences() {
7474
int count ;
7575
string line ;
7676
string name ;
77-
string read = "*" ;
77+
string read ;
7878
while (std::getline(txt_file, line)) {
7979
istringstream iss(line) ;
8080
vector<string> tokens{istream_iterator<string>{iss}, istream_iterator<string>{}} ;
81-
if (read == "*") {
81+
if (tokens[0] != "*") {
8282
read = tokens[0] ;
8383
}
8484
string canon = canonicalize(tokens[1]) ;
@@ -95,14 +95,14 @@ void Aggregator::load_sequences() {
9595
}
9696
lprint({"Merging.."});
9797
for (int j = 0; j < num_batches; j++) {
98-
lprint({"Batch", to_string(j), "with", to_string(_sequences[j].size()), "sequences."});
98+
lprint({"Batch", to_string(j), "with", to_string(_sequences[j].size()), "sequences."});
9999
for (auto it = _sequences[j].begin(); it != _sequences[j].end(); it++) {
100100
if (sequences.find(it->first) == sequences.end()) {
101101
sequences[it->first] = 0 ;
102102
}
103103
sequences[it->first] += it->second ;
104104
read_ids[it->first].insert(_read_ids[j][it->first].begin(), _read_ids[j][it->first].end()) ;
105-
assert(sequences[it->first] == read_ids[it->first].size()) ;
105+
//assert(sequences[it->first] == read_ids[it->first].size()) ;
106106
}
107107
_sequences[j].clear() ;
108108
}

0 commit comments

Comments
 (0)