Closed ielis closed 2 years ago
Uh-oh. Good find! I presume you found this the hard way rather than checking the tests manually?
I found the bug empirically, by running SvAnna & debugger. I am somewhat sure the bug happens when the longer allele has the same base at both ends. I am not sure, however, what is the desired trimming output :confused:
Was doing some work here anyway so I applied you fix.
I agree trimming does seem overly complicated but its just the way it is! Looks like you got the right idea. @ielis can you build and test this please.
The code where &&
is replaced with ||
works OK on my VCFs, so I think we fixed the bug.
Hi @julesjacobsen , I found a bug in
VariantTrimmer
.Running the following:
leads to:
The bug is only present when trimming with LEFT shifting and REMOVING the common base. Other strategies work well.
I think the bug can be solved by changing
||
to&&
inVariantTrimmer
line 181. I added a test (different from the test above) that shows the bug presence to branchvariant_trimmer_bug
here.Could you please look at this when you have a chance? I think you understand trimming better than I.
Thanks & cheers, DD