This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Overlapping regions in bedGraph

I tried to convert my bedGraph file to bigwig file using "bedGraphToBigWig" tool. while doing so, I ran this code :

> bedGraphToBigWig H3K4me3.unique.bedGraph hg38.chrom.sizes H3K4me3.bw

But I received this error :

Error - overlapping regions in bedGraph line 280 of H3K4me3.unique.bedGraph

How to solve it ?

bedgraphtobigwig bedgraph

I would consider trying to find out why this occurred in the first place, as this is somewhat unusual.

Adding to this, was the bedGraph created manually or is it the direct output of a different tool?

I created it manually.

Actually, I had a .bedGraph file

"GSM1204470_MDAMB231.H3K4me1_1.hg19.tags.bedGraph" which has hg19 as reference genome.

But then I used "liftOver" tool and changed it to hg38 reference genome and saved the output as .bed file.

Then, I converted .bed file to .bedGraph by manually adding "score" column.

Thus prepared .bedGraph file is now being converted to bigwig file and this issue is shown.

Sort the liftOver file and check for overlaps. lifeOver can be imprecise.

Seconding the others, this should not happen, so it's an error in the upstream generation. Common tools that do bedGraphs properly:

  • deeptools bamCoverage
  • bedtools genomecov
  • inside R: rtracklayer::export() where input could be a GRanges object.

It might be as simple as a 0-based vs 1-based problem here, so please address question from @cmdcolin

0 answers

No answers yet.

Log in to answer this question.