Hi,
I've identified a "bug" in UCSC's bedGraphToBigWig.
It does not work with single base coverage.
If I have a file where the start and end are always equal (i.e. single base coverage), the bigWig file generated by bedGraphToBigWig is empty.
Does anyone have a workaround, or am I simply not respecting the format for bedgraph files? If I want to include the count just for base 1, how am I supposed to write it?
1 1 count
or
1 2 count
The 1st option appears correct but bedGraphToBigWig will not take it.
It would be a big job to convert all my bedgraph files to the format bedGraphToBigWig appears to want.
Here are 2 example bedgraph files: test1.bedgraph with the start and the end equal to 1, and test2.bedgraph where the start and end are 1 and 2, respectively. The bigWig files generated by bedGraphToBigWig is empty in the first case, and with 1 base covered in the second case.
blancha@sw-2r12-n36 ~]$ more test1.bedgraph
chr1 1 1 1
[blancha@sw-2r12-n36 ~]$ more test2.bedgraph
chr1 1 2 1
[blancha@sw-2r12-n36 ~]$ bedGraphToBigWig test1.bedgraph UCSCChromInfo.txt test1.bw
[blancha@sw-2r12-n36 ~]$ bedGraphToBigWig test2.bedgraph UCSCChromInfo.txt test2.bw
[blancha@sw-2r12-n36 ~]$ bigWigInfo test1.bw
version: 4
isCompressed: yes
isSwapped: 0
primaryDataSize: 30
primaryIndexSize: 6,204
zoomLevels: 1
chromCount: 1
basesCovered: 0
mean: -nan
min: 1.000000
max: 1.000000
std: -nan
[blancha@sw-2r12-n36 ~]$ bigWigInfo test2.bw
version: 4
isCompressed: yes
isSwapped: 0
primaryDataSize: 32
primaryIndexSize: 6,204
zoomLevels: 1
chromCount: 1
basesCovered: 1
mean: 1.000000
min: 1.000000
max: 1.000000
std: 0.000000
Thank you for your help.
I've identified a "bug" in UCSC's bedGraphToBigWig.
It does not work with single base coverage.
If I have a file where the start and end are always equal (i.e. single base coverage), the bigWig file generated by bedGraphToBigWig is empty.
Does anyone have a workaround, or am I simply not respecting the format for bedgraph files? If I want to include the count just for base 1, how am I supposed to write it?
1 1 count
or
1 2 count
The 1st option appears correct but bedGraphToBigWig will not take it.
It would be a big job to convert all my bedgraph files to the format bedGraphToBigWig appears to want.
Here are 2 example bedgraph files: test1.bedgraph with the start and the end equal to 1, and test2.bedgraph where the start and end are 1 and 2, respectively. The bigWig files generated by bedGraphToBigWig is empty in the first case, and with 1 base covered in the second case.
blancha@sw-2r12-n36 ~]$ more test1.bedgraph
chr1 1 1 1
[blancha@sw-2r12-n36 ~]$ more test2.bedgraph
chr1 1 2 1
[blancha@sw-2r12-n36 ~]$ bedGraphToBigWig test1.bedgraph UCSCChromInfo.txt test1.bw
[blancha@sw-2r12-n36 ~]$ bedGraphToBigWig test2.bedgraph UCSCChromInfo.txt test2.bw
[blancha@sw-2r12-n36 ~]$ bigWigInfo test1.bw
version: 4
isCompressed: yes
isSwapped: 0
primaryDataSize: 30
primaryIndexSize: 6,204
zoomLevels: 1
chromCount: 1
basesCovered: 0
mean: -nan
min: 1.000000
max: 1.000000
std: -nan
[blancha@sw-2r12-n36 ~]$ bigWigInfo test2.bw
version: 4
isCompressed: yes
isSwapped: 0
primaryDataSize: 32
primaryIndexSize: 6,204
zoomLevels: 1
chromCount: 1
basesCovered: 1
mean: 1.000000
min: 1.000000
max: 1.000000
std: 0.000000
Thank you for your help.
Comment