Hello,

I am not sure if this has been answered before as I looked and couldn't find a simple answer.

I have a bam file, and all I want is to annotated all regions with 0 coverage in bed format. Is that possible?

Thank you,

Adrian
You want the ["genomecov" tool](http://bedtools.readthedocs.org/en/latest/content/tools/genomecov.html#bga-reporting-genome-coverage-for-all-positions-in-bedgraph-format)

Example:

    $ bedtools genomecov -ibam aln.bam -bga | head
    chr1  0       554304  0
    chr1  554304  554309  5
    chr1  554309  554313  6
    chr1  554313  554314  1
    chr1  554314  554315  0
    chr1  554315  554316  6
    chr1  554316  554317  5
    chr1  554317  554318  1
    chr1  554318  554319  2
    chr1  554319  554321  6

To extract solely the intervals with no coverage just use awk to filter the results:

    $ bedtools genomecov -ibam aln.bam -bga | awk '$4==0' | head -n 2
    chr1  0       554304  0
    chr1  554314  554315  0