Just making sure we don't forget to fix this simple bug, after the huge refactor is merged.
// FIXME. The loop below doesn't output the last SNP.
// Also the counts may be off by 1.
uint64_t cur_count = 0;
uint64_t cur_snp = kmer_matches[0];
for (auto it : kmer_matches) {
if (it != cur_snp) {
fh << cur_snp << '\t' << cur_count << '\n';
cur_snp = it;
cur_count = 1;
} else {
++cur_count;
}
}
Just making sure we don't forget to fix this simple bug, after the huge refactor is merged.