Commit a797c16d authored by Mikaël Salson's avatar Mikaël Salson

automaton.hpp: Count kmers even if they are not new

This seem weird and is a bit hacky. But the purpose is
not to disadvantage a real germline (eg. IGH) compared
to a fake germline (unexpected).

As there are more ambiguous k-mers in the unexpected germline
there will be less IGH k-mers hence a smaller index load for
IGH in the unexpected germline rather than the real one.

See also #2651.
parent 5f213922
......@@ -183,16 +183,12 @@ void PointerACAutomaton<Info>::insert(const seqtype &seq, Info info) {
}
}
state->is_final = true;
if (state->informations.front().isNull()) {
this->nb_kmers_inserted++;
this->kmers_inserted[info]++;
this->nb_kmers_inserted++;
this->kmers_inserted[info]++;
if (state->informations.front().isNull() || ! this->multiple_info)
state->informations.front() += info;
} else {
if (this->multiple_info)
state->informations.push_back(info);
else
state->informations.front() += info;
}
else
state->informations.push_back(info);
}
template <class Info>
......
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