Skip to content

Commit fb8496c

Browse files
committed
WARNING message when patterns are too similar
1 parent 579d94c commit fb8496c

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/Demultiplexing/Demultiplexer.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,13 @@ void Demultiplexer<MappingPolicy, FilePolicy>::demultiplex_wrapper_batch(const s
151151
//write demultiplexed information into demultiplexedLine, this is passed by reference and can be accessed here
152152
if(this->demultiplex_read(line, tmpDemultiplexedLine, pattern, input, lineCount, totalReadCount, tmpPatternScore, lineStatsPtr) && tmpPatternScore < bestPatternScore)
153153
{
154+
if(bestPatternScore != std::numeric_limits<int>::max())
155+
{
156+
std::cout << "Warning: We previously found a matching pattern (" << foundPatternName << ") with " << bestPatternScore << " mismatches\n";
157+
std::cout << "Now we found a better matching pattern: " << pattern->patternName << " with " << tmpPatternScore << " mismatches.\n";
158+
std::cout << "This can happen when patterns are VERY similar (e.g., only difference is staggers). In that case do not worry. But maybe \
159+
you want to allow less mismatches inside the stagger element or the element following the stagger to get more unique matches\n.";
160+
}
154161
foundPatternName = pattern->patternName;
155162
result = true;
156163
finalDemultiplexedLine = tmpDemultiplexedLine;

0 commit comments

Comments
 (0)