Fixed hardclipping inside indel (right tail)
when hard clipping the right tail of a read falls inside a deletion, clipping should fall back to the last base before the deletion to follow the ReadClipper's contract.
This commit is contained in:
parent
3c7b7f74ef
commit
ff2f4df043
|
|
@ -893,6 +893,10 @@ public class ReadUtils {
|
||||||
// base before the deletion (see warning in function contracts)
|
// base before the deletion (see warning in function contracts)
|
||||||
else if (fallsInsideDeletion && !endsWithinCigar)
|
else if (fallsInsideDeletion && !endsWithinCigar)
|
||||||
readBases += shift - 1;
|
readBases += shift - 1;
|
||||||
|
|
||||||
|
// If we reached our goal inside a deletion then we must backtrack to the last base before the deletion
|
||||||
|
else if (fallsInsideDeletion && endsWithinCigar)
|
||||||
|
readBases--;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue