I have some profiles with scores in BED format and I would like to convert them into bigWig format to visualise these data in jBrowse.
9 35084375 35084376 ENSDART00000000004 160.9480969 - 9 35060460 35060461 ENSDART00000000005 752.3776435 + 4 14148184 14148185 ENSDART00000000019 5226.62898 - 2 50770137 50770138 ENSDART00000000042 3513.471655 -
Typically (genomeCoverageBed + bedGraphToBigWig), the intervals from BED file are summed up into bigWig, but this is not what I want. I would like the scores from BED to be visible directly in bigWig track.
Can you recommend me some way of converting such BED in bigWig?
Nice reply, but how to get the "myChrom.sizes"? Thanks.
Please see: A: Easiest Way To Obtain Chromosome Length?
Thank you michael.ante ! But watch out, there's an extra apostrophe at the end of the awk syntax ' (on the answer)
thanks Michael, that was good hint!
I have overlapping intervals, therefore I sort it and merge the overlapping intervals first and then convert it to bedGraph and BigWig.
Has someone encountered a problem with this? I did exactly this and the bigwigs look a bit weird. The bedGraph (MACS2 output .bdg file) shows nicely the peak-like bumps of signal whereas the bigwig shows narrow, rectangular towers as if it's just marking summits or the presence/absence of a peak instead of the different heights along the peak interval. I followed exactly the steps that are in this answer.. (sorted, created the chrom file and converted to bigwig - human chipseq data, hg38) could it be that there is some other parameter that I should add that I am ignoring?
Currently, I'm not 100% into this topic. I think it would be best to post this as a new question referring to this thread. I can remember that there are two ways of structuring a wig file, but which way is the more appropriate one I cannot remember.
I tried again with other of my samples and it seems the one I was handling had a problem or something, because the same exact procedure with others worked well. So your answer is still working! Forget my previous comment. For the record, there's also a tool called bedSort from UCSC that can be used for the sorting step.
Sorry , another comment. If you want to include this on a Bash script (that has arguments) the line with the awk crashes (since the $1, $2.. are substituted with the parameter values you feed into the script). An alternative might be cut -f1-3,5 instead of awk. That could be a nice edit to the answer. Thank you!