Question: Generate bed file containing regions with no bigwig coverage
0
gravatar for mmmmcandrew
2.1 years ago by
mmmmcandrew60
mmmmcandrew60 wrote:

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 • 826 views
ADD COMMENTlink modified 2.1 years ago by Pierre Lindenbaum120k • written 2.1 years ago by mmmmcandrew60

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 REPLYlink written 2.1 years ago by mmmmcandrew60
3
gravatar for Pierre Lindenbaum
2.1 years ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum120k wrote:

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 COMMENTlink written 2.1 years ago by Pierre Lindenbaum120k

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

ADD REPLYlink written 2.1 years ago by mmmmcandrew60
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1618 users visited in the last hour