Please also notice that bedGraphToBigWig require a sorted input file
$ bedGraphToBigWig
bedGraphToBigWig v 4 - Convert a bedGraph program to bigWig.
usage:
bedGraphToBigWig in.bedGraph chrom.sizes out.bw
where in.bedGraph is a four column file in the format:
<chrom> <start> <end> <value>
and chrom.sizes is two column:
<chromosome_name> <size_in_bases>
and out.bw is the output indexed big wig file.
The input bedGraph file must be sorted, use the unix sort command:
sort -k1,1 -k2,2 unsorted.bedGraph > sorted.bedGraph
options:
-blockSize=N - Number of items to bundle in r-tree. Default 256
-itemsPerSlot=N - Number of data points bundled at lowest level. Default 1024
-unc - If set, do not use compression.
ADD COMMENT
• link
updated 2.4 years ago by
Ram
44k
•
written 12.7 years ago by
dli
▴
250
0
Entering edit mode
bedGraph has a header: track type="bedGraph" description="***", I think you can not sort directly with
Please give the error messages, I have experienced 5 different kinds of errors while doing this conversion and each error is linked to a different solution.
Also, check this tutorial for bigWig conversion and viewing. Also, if bedgraph file is big, you should stick to bigBed or bigWig.
bedGraph has a header:
track type="bedGraph" description="***"
, I think you can not sort directly withBe sure your bedGraph only has 4 columns.