Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Short explanation
In the following lines at kmerindex::match() function the right logic in the if condition is followed.
Lines: L1069, L1128, L1178, L1195
!= kmap.end()
is equivalent to// if k-mer found
and if
!= kmap.end()
returnstrue
that means search variables contains result of successfull alignment in the hashTable so the following Line#1100 thefound2
flag state changed to betrue
as an indication thatsearch2
has kmer match while the condition== kmap.end()
check if kmer not found then raise the flag.So, in the Line#1099 the condition needs to be fixed to check if the
search2
haskmer match
by changing the==
to!=
Detailed explanation
Data used in the test
1- Reference
2- Reads
The unexpected behavior happends when pseudo-aligning the 6.fa with reference1 which has the original 4 unique transcripts.
3- Results
Vector V after pseudo-alignment
(Debugging_Print) SORTED KmerEntry vector(V)
The last
read_pos
is equal to2496
while the read length is100pb
!That makes sense, there's no need in this case to enter the this is weird, let's try the middle k-mer section or to backOff
Side Note
This bug was discovered unintentionally when adding the option Union of Compatibility classes instead of the default Intersect
To be able to create new compatibility classes if there's no intersection between two transcripts in the reference just like when pseudo-aligning the 6.fa on reference1 or reference2