Hi,
Is it possible to use bedtools genomecov
with both -bga
and -max
flags?
I've been trying to do this (code below), but my resulting output isn't binned.
bedtools genomecov -max 1 -bga -ibam input.bam -g hg19.genome > output.bed
chr1 0 554304 0
chr1 554304 554309 5
chr1 554309 554313 6
chr1 554313 554314 1
Whereas I'd like it to be:
chr1 0 554304 0
chr1 554304 554314 1
Any help is much appreciated.
SB :)
Thanks Aaron, that makes sense. Knew I was missing something obvious. I'll work out another way to concatenate the covered regions so I don't have lots of sequential regions with 1 coverage.