This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Tools to calculate coverage of a bam file window by window

Hi there,

I am looking for a tool that scans an input bam file window by window (by window I mean consecutive counting bins of constant size, e.g. 10kb) and outputs the total or average coverage in percent per window. What would be the best way to do this? I've been looking at gatk CollectReadCounts, samtools coverage and DeepTools bamcoverage.

Thanks!

samtools deeptools bam gatk

1 answer

mosdepth (https://github.com/brentp/mosdepth) is a fast tool to do this; and you can specify -b 10000 to run on 10kb windows, instead of (like GATK or FeatureCounts etc) needig to create and pass in a binned .bed file.

Log in to answer this question.