This is a test version of Biostars. For the public version, visit https://www.biostars.org.
error in wigToBigWig while converting mappability to bedgraph

I am following this tutorial to create bedgraph from mappability file.

gem-indexer -i hg38.fa -o hg38
gem-mappability -I hg38.gem -l 50 -o hg38.50mer -T 8
gem-2-wig -I hg38.gem -i hg38.50mer.mappability -o hg38.50mer
wigToBigWig hg38.50mer.wig hg38.50mer.sizes hg38.50mer.bw
bigWigToBedGraph hg38.50mer.bw  hg38.50mer.bedGraph

and everything goes well before wigToBigWig.

I am now having ca_k35_mappability.sizes and ca_k35_mappability.wig

when I run

wigToBigWig ca_k35_mappability.wig ca_k35_mappability.sizes ca_k35_mappability.bw

i GOT

invalid unsigned integer: "Cavia" 

immediately after running and them the program exit.



I got wigToBigWig and bigWigToBedGraph tools from [http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/][1]

[1]: http://hgdownload.cse.ucsc.edu/admin/exe/linux.x86_64/


May anyone know what happen?

Thank you in advance.

mappability gem bedgraph wigtobigwig

invalid unsigned integer: "Cavia"

there is a probkem with the file ca_k35_mappability.wig

show use the output of

head  ca_k35_mappability.wig | tr "\t" "#"

Thank you so much for your reply! here is what I have after entering the command

variableStep#chrom=NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold#span=5
1#0.000188186
variableStep#chrom=NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold#span=7
6#0.000236465
variableStep#chrom=NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold#span=3
13#0.000188186
variableStep#chrom=NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold
16#0.000236465
17#0.000188186
variableStep#chrom=NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold#span=19

Is it because of the name of the chrom too long? or the space inside.

Or anything else cause the problem?

1 answer

remove the spaces from your "chrom" key

variableStep chrom=NT_173277 span=5

or may be quote the chrom

variableStep chrom="NT_173277.1 Cavia porcellus strain inbred line 2N unplaced genomic scaffold" span=5

And I also change the chrom name in the .sizes file.

That works perfect. Thank you very much!

Log in to answer this question.