This is a test version of Biostars. For the public version, visit https://www.biostars.org.
bedGraphToBigWig error : Expecting at least 3 words line 1 of chrom.sizes. got 2

Hello everyone I am trying to convert a bedGraph file to bigwig format. I am using bedGraphToBigWig with the command below

bedGraphToBigWig hg38.chrom.sizes sorted.bedGraph Merge.bw

the error message :

  Expecting at least 3 words line 1 of hg38.chrom.sizes got 2

However I believe that chrom.sizes files is correct as I downloaded hg38.chrom.sizes from UCSC http://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes

I produced sorted.bedGraph file with bigWigMerge with this command

bigWigMerge -inList list.txt merge.bedGraph
sort -k1,1 -k2,2n merge.bedGraph > sorted.bedGraph

I don't know how to fix this problem and I would appreciate your suggestions thank you

bigwig bedgraph

1 answer

Your order of arguments is wrong, must be:

bedGraphToBigWig sorted.bedGraph hg38.chrom.sizes Merge.bw

Log in to answer this question.