Commit 5d2c0f4d authored by Mathieu Giraud's avatar Mathieu Giraud

Merge branch 'feature-a/3346--debug-filter-with-kmer-info' into 'dev'

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

Closes #3346

See merge request !236
parents 055851f2 ab4e65b9
Pipeline #32075 passed with stages
in 48 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