You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I too am facing this issue. It seems this will occur with single-end reads even if I don't supply any primer BED file, i.e. quality-based trimming only.
Example
Before trimming: 5XHX7:02978:00991 16 AJ277461.2 526 60 257M * 0 0 AAGGATGATGTCTCTAGAACCAACTGCAGACTGTGGAGTGGAAAAAGGCTTTACAACGGAAAGGATTAAGACTGGAAAGGTGGACTTGGATAGCTGTTGCACTCAGCATGGATGTACAAAAGGGATTAGGGTGGAGGTTCCATCGCCTGTACTGGTATCGGCCAAATGCAATGAAATTTCATTCAGAGTAGTGCCGTTCCATTCTGTACCAGACAGGTTAGGGTTCGCTAGAACTAGTTCTTTTACACTAAGAGCCG 4:4AAAABCCA@A@AA=:95;5;;AABBCCBCCC@CBBC>;*;;<<5BB=EBBC?BA>A=BB?AA@B?BB@@@=@:AA=CD@CAA?B@BCCCBBDE?EAAA9:::99@B@FCBBCAA9FDB=BBB@C@<AA@ACC?D@C@BCBBBADCBBAA@>BBB<;7A=;7;;<BA=A@:/99/=<<?<@?>?CCCCBCB@BB@DACC@CBBBD@>?ADDECACACC=EE@DDBCCAA?CCCCFABB:CCBBBBBB?BBCDIFF NM:i:4 MD:Z:63A116G36C38A0 AS:i:482 XS:i:0
I think Ivar trim is getting the placement wrong after soft clipping. It seems to mix up soft clipping on the left and the right end. This example, the trimmed read is placed on position 610, i.e. 526 + 84 (the soft clipping at the right end). It should be placed on position 550 (526+24).
The same logic applies to the example of @Ivarz above.
Describe the bug
After trimming single end reads the position for some of them is incorrect.
Example SAM record:
Before primer trimming:
After primer trimming:
To Reproduce
Steps to reproduce the behavior:
ivar trim -i $BAM -b $BED -p PREFIX
Interestingly, when separately performing repeated alignment and primer trimming on such reads, the trimming is performed correctly.
Expected behavior
In this case read should map to position 665 (650 + 15) not 672.
I can provide you with more cases to help debugging.
The text was updated successfully, but these errors were encountered: