Commit ab4e65b9 authored by Cyprien Borée's avatar Cyprien Borée

Display the number of k-mer for each genes if debug_filter is defined

For more informations see #3346.
parent 055851f2
Pipeline #32060 passed with stages
in 41 minutes and 54 seconds
......@@ -68,6 +68,25 @@ BioReader FilterWithACAutomaton::filterBioReaderWithACAutomaton(
}
mapAho = automaton->getMultiResults(seq);
#ifdef DEBUG_FILTER /* Display the number of k-mers found for each genes. */
int currentAsciiNumber;
string previousLabel = "", currentLabel;
currentAsciiNumber = SPECIFIC_KMERS_NUMBER;
previousLabel = extractGeneName(originalBioReader.label(0));
for(int i = 1;i < originalBioReader.size(); ++i){
for(auto const mx: mapAho){
currentLabel = extractGeneName(originalBioReader.label(i));
if(currentLabel != previousLabel){
currentAsciiNumber++;
}
if(currentAsciiNumber == int(mx.first.getLabel().at(0))){
cout << mx.second << " kmers found for " << originalBioReader.label(i) << endl;
}
previousLabel = currentLabel;
}
}
#endif
//All k-mers selected : iterate over all map
if(kmer_threshold == ALL_KMERS_VALUE || kmer_threshold > (int)mapAho.size()){
for(auto const mx: mapAho){
......
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