Generate bed file containing regions with no bigwig coverage
1
0
Entering edit mode
7.0 years ago
mmmmcandrew ▴ 190

Hey all-

I would like to find regions in a bigwig file which do not have a score (excluding regions with a score of 0 or more) and output as a bed file. Does anyone know of an easy way to do this? The bigwig files simply contain no data where there is no score (i.e. there is not a "location: no score") value, so it would have to be compared to the entire genome. I also have to use bigwig as the input, so something like bedrolls genomecov wouldn't work for me, since it takes BAM as input.

Thanks!

bigwig bed • 2.3k views
ADD COMMENT
0
Entering edit mode

As a follow up to this, I would like to be able to generate random regions in a bed file which excluded all of the regions where there is no score in the bigwig file. It doesn't seem that bedtools random has a mask option, however. Is there an alternative where I could generate random regions that excluded certain portions of the genome?

ADD REPLY
3
Entering edit mode
7.0 years ago

I would like to find regions in a bigwig file which do not have a score

convert the wig to bedgraph : https://genome.ucsc.edu/goldenpath/help/bigWig.html

use awk to filter out the region having a value lower than your treshold.

also use 'bedtools complement' to find the regions not covered by the bedgraph.

ADD COMMENT
0
Entering edit mode

Thanks Pierre, this worked very nicely to allow me to find regions where we simply didn't have coverage from our sequencing data.

ADD REPLY

Login before adding your answer.

Traffic: 2841 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6