Commit 167fb031 authored by Mikaël Salson's avatar Mikaël Salson

kmerstore.h: getLabel ignores the length with unique-seed indexes

This is necessary (for instance) with xxx germlines.
parent c6139e77
......@@ -402,6 +402,12 @@ Fasta IKmerStore<T>::getLabel(T kmer) const {
for (typename list< pair<T, Fasta> >::const_iterator it = labels.begin(); it != labels.end(); ++it)
if (it->first == kmer)
return it->second ;
// Nothing interesting found
// Try by ignoring length if the index is not able to deal with different lengths
if (! hasDifferentKmerTypes() && kmer.getLength() != (unsigned char)~0) {
kmer.setLength(~0);
return getLabel(kmer);
}
return FASTA_AMBIGUOUS ;
}
......
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