This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Bigwig To Wig Conversion

Hello, I am trying to convert a bigWig file to a Wig file. Does anyone know how to do this?

I am trying to use the bigWigToWig program from UCSC. From the command line I have tried:

bigWigToWig in.bigWig out.wig

Unfortuantely, this command give me this error:

bigWigToWig: command not found

I have the bigWigToWig program as well as the in.bigWig file in the same directory. Does anyone have a solution or know what I am doing wrong?

Thanks in advance for the help.

ucsc bigwig

Can you please share the link from where you installed bigWigToWig? Thank you

3 answers

under linux check that the folder containing bigWigToWig is in your $PATH

export PATH=${PATH}:/your/path/to/ucsc/bin
bigWigToWig in.bigWig out.wig

or , as bigWigToWig is in your directory , you can just write

./bigWigToWig in.bigWig out.wig

Pierre, thanks for the help! I read the links you provided and followed your directions. I confirmed that the bigWigToWig program is now in my $PATH. When I now try to execute the bigWigToWig in.bigWig out.wig command, I get a Permissions denied error. I tried this locally on my Mac and also on our server. I get the same error. Any other ideas? Thanks again.

do you have the right to write here ? try "bigWigToWig in.bigWig /tmp/out.wig"

...or try moving (copying) bigWigToWig into whatever directory the files you want to convert are located. Not a good permanent fix, but might work in the short term.

@Pierre I tried your "bigWigToWig in.bigWig /tmp/out.wig" command and I also get a Permission denied message. I tried to run bigWigToWig on my local machine's Desktop rather than on the server and I still get the same Permission denied message?! I also double checked to make sure that bigWigToWig is in my path. Do you have any other ideas? Thanks again for all the help.

It is possible bigwigtowig is not executable. Type

chmod +x ./bigWigToWig

and rerun your command.

Thank you! This turned out to be the real problem.

Dear Farhat,

I tried doing the same, but my problem is that the file is a binary and therefore not an executable

The roor message that I get is - bash: ./bigWigToWig: cannot execute binary file: Exec format error

Thanks

check your platform 32/64 bits vs the program 32/64 bits

platform and program are both 64 bits

Assuming you're using linux:

Are you currently in the directory that has bigWigToWig in it? If so, and if it's not in your $PATH, you should use "./bigWigToWig". If you want to be able to run it without that './' move it to your $PATH or add it's directory to your $PATH (see Pierre's answer).

Byron, thank you for the help. Yes, the program (bigWigToWig) and the .bigWig file were initially in the same directory, so I tried your ./bigWigToWig suggestion. It returned a Permissions denied error (see above). Thanks for the help. Do you have any other suggestions?

Log in to answer this question.