I generally go the path of bigwig -> BigWigTobedGraph-> bedtools unionbedg (or custom awk-fu) -> bedGraphToBigWig for that, which essentially has no memory footprint, though all that file conversion-fu is a bit of an anticlimax.
Dear all,
Are there any other software that you'd recommend to convert directly bedgraph into bigwig, beside using UCSCtools (bedGraphToBigWig) ? Thank you,
Bogdan
3 answers
I'm not sure of the exact function to do this but libBigWig may be one non-ucsc example of this https://github.com/dpryan79/libBigWig which has python interfaces https://github.com/deeptools/pyBigWig and https://github.com/brentp/bw-python
I would also be curious in the answer for this, I had a user saying that creating merging bigwigs from multiple chromosomes was prohibitively memory intensive for them
The bg2bw utility in https://github.com/cancerit/cgpBigWig can do that, but it will only compile on Linux iirc based on how they coded up the compilation instructions. It builds on the pyBigWig library linked by @cmdcolin
I have tried to install it on Mac, and I am getting an error :
+ INIT_DIR=/Users/tanasab/Desktop/SOFTWARE/cgpBigWig/cgpBigWig
++ grep -c '^processor' /proc/cpuinfo
grep: puinfo: No such file or directory
+ CPU=
How shall I setup the file "cpuinfo" ? Thanks !
As I said, it compiles on Linux, not Mac. The way they coded up the compilation instructions are not compatible with macOS. /proc/cpuinfo does not exist on macOS.
Thank you everyone. I was asking because sometimes the ucsc tools perform a conversion bedgraph > bigwig that is not properly read in IGV. The error that I have gotten is :
Error loading /Users/tanasab/Downloads/GSE103543_AR16_H3K4me3_Corrected_HMD.bigwig.gz: Error reading BBFile header for: /Users/tanasab/Downloads/GSE103543_AR16_H3K4me3_Corrected_HMD.bigwig.gz
Log in to answer this question.