bigWig to bigBed conversion
0
0
Entering edit mode
7.2 years ago
moxu ▴ 510

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 • 3.7k views
ADD COMMENT
2
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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).

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
1
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

¯\ _ (ツ)_/¯

ADD REPLY

Login before adding your answer.

Traffic: 1891 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