This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bigWig to bigBed conversion

Sorry for the simple question, but what's the best way to convert bigWig to bigBed?

One can do the following:

bigWigToWig wig2bed bedToBigBed

which looks convoluted and I am not sure if this is the (best) way to do it.

Thank you!

next-gen genome sequence

That's probably the best way to do it. However, I wonder why you want to do that. bigBed is tweaked weird version of bigWig that needs more space. I would expect that anything supporting bigBed also supports bigWig.

Well, here is the bigWigCorrelate help information:

bigWigCorrelate - Correlate bigWig files, optionally only on target regions.
usage:
   bigWigCorrelate a.bigWig b.bigWig
options:
   -restrict=restrict.bigBed - restrict correlation to parts covered by this file
   -threshold=N.N - clip values to this threshold

It requires "bigBed" for the "restrict" option.

Makes sense. Just be sure that the resulting bigBed file has useful regions. If your bigWig file is base-level resolution or something like that then the resulting bigBed file probably won't be useful.

BTW, an alternative would be to use multiBigwigSummary from deepTools, followed by plotCorrelation (also from deepTools).

The step of bedToBigBed had the following error:

bedToBigBed a.bed hg38.chrom.sizes b.bigBed (Mon Feb  6 16:34:32 EST 2017)
pass1 - making usageList (25 chroms): 2 millis
Trailing characters parsing signed integer in field 5 line 1 of a.bed, got 69.000000

a.bed looks like the following:

chr1    2156529 2156547 id-1    69.000000
chr1    5160264 5160273 id-2    25.000000
chr1    19793827    19793830    id-3    32.000000
chr1    19883533    19883543    id-4    43.000000
chr1    24617911    24617928    id-5    26.000000

Anything wrong?

Thank you.

I'm not sure it can take floats, either cut off that column or replace it with a . or some random integer.

You are right, after truncating .000000, it finished without a problem. It's odd, though, because the bed file was generated by wig2bed. Thanks.

0 answers

No answers yet.

Log in to answer this question.