bedGraphToBigWig in.bedGraph chrom.sizes out.bw
This tool is part of UCSC Genome Browser's utilities.
Tab
).Tab
)If the assembly is hosted by UCSC, chrom.sizes can be a URL like http://hgdownload.soe.ucsc.edu/goldenPath//bigZips/.chrom.sizes or you may use the script fetchChromSizes
to download the chrom.sizes file. If not hosted by UCSC, a chrom.sizes file can be generated by running twoBitInfo
on the assembly .2bit file.
The input bedGraph file must be sorted, use the unix sort
command:
sort -k1,1 -k2,2n unsorted.bedGraph > sorted.bedGraph