d4-format
d4-format copied to clipboard
New stat function: % of positions in intervals with coverage >X
This is something we are looking at over at the https://github.com/Clinical-Genomics/chanjo2 repo.
The current approach is to read the output from the d4 file using d4tools show
. It would be much quicker to do this directly in d4tools
.
The execution could be something like:
$ d4tools stat --stat perc_cov "10,20,30" --region "intervals.bed"
The desired output would be something like:
chr start end 10x 20x 30x
19 31030023 32034023 98.3 96.3 94.1
19 49624990 49625000 94.2 90.3 85.3
19 49625010 49625020 88.5 80.3 75.3
Feedbacks on this are welcome. If I have the time, and no one else jumps on it, I'll give it a go and see if I can implement it.