d4-format icon indicating copy to clipboard operation
d4-format copied to clipboard

`d4tools create` should not count deletion parts of reads when calculation coverage.

Open ghuls opened this issue 10 months ago • 1 comments

d4tools create should not count deletion parts of reads (D parts of CIGAR string) when calculating coverage.

samtools depth excludes deletions by default (unless you specify -J) when calculating coverage.

-J           Include reads with deletions in depth computation

ghuls avatar Jan 23 '25 10:01 ghuls

Hi, as you've seen, d4 uses the entire read and does not consider cigar operations. I'd likely accept a PR with tests to modify the code here

You can also use mosdepth with the --d4 option to get depth that considers cigar operations.

brentp avatar Jan 23 '25 15:01 brentp