arq5x / bedtools2

bedtools - the swiss army knife for genome arithmetic
MIT License
941 stars 287 forks source link

Feature request: add -min option to genomecov #1075

Open ammaraziz opened 10 months ago

ammaraziz commented 10 months ago

Thank you for creating bedtools, it's an amazing tool.

bedtools genomecov has the -max option to combine all positions with depth greater than the specified value. It's also useful to do the inverse, -min to combine all positions less than the value.

One very useful outcome is that it's now possible to use bedtools and nothing else to mask low coverage regions as maskfasta only accepts bed inputs.

bedtools genomecov -ibam sample.bam -min 20 > mask.bed
bedtools maskfasta -fi sample.fasta -bed mask.bed -fo sample.masked.fasta

Thank you,

Ammar