bedGraphToBigWig : command not found
0
0
Entering edit mode
5.4 years ago

I have a problem with bedGraphToBigWig.

The code used to work, but today it started to output 'command not found' for no good reason.

I did

chmod +x ./filePath 
./filePath/utility_name

To be more precise, that's what i did exactly:

chmod +x /home/anatoly/Epigenetics/Internship/assignment/
/home/anatoly/Epigenetics/Internship/assignment/bedGraphToBigWig

and it printed the usage message, and then I tried running the code, but it didn't work:

    bedGraphToBigWig v 4 - Convert a bedGraph file to bigWig format.
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 a two-column file/URL: <chromosome name=""> <size in="" bases="">
and out.bw is the output indexed big wig file.
If the assembly <db> is hosted by UCSC, chrom.sizes can be a URL like
  http://hgdownload.soe.ucsc.edu/goldenPath/<db>/bigZips/<db>.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
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.

 

~/Epigenetics/Internship/assignment$ bedGraphToBigWig tl.bedgraph hg38.chrom.sizes tl.bw
bedGraphToBigWig: command not found

So, I take it I gave the right path to the utility because the usage message printed, yet the result was 'command not found' message.

software error • 3.5k views
ADD COMMENT
1
Entering edit mode

Try this

./bedGraphToBigWig tl.bedgraph hg38.chrom.sizes tl.bw

Also do this before trying above command,

chmod +x /home/anatoly/Epigenetics/Internship/assignment/*

Not sure your command chmods all contents of the directory.

ADD REPLY
1
Entering edit mode

If you wish to use bedGraphToBigWig without specifying full or relative paths then you need to ensure that the directory containing that executable is added to your $PATH by doing export PATH=$PATH:/full_path_to_executable.

ADD REPLY
0
Entering edit mode

I've tried both './bedGraph...' and 'PATH=$PATH...' methods and they both worked like a charm, thank you! Though I run into 'access denied' when tried to execute the tool after adding the $PATH, but then managed to solve it by typing chmod +x ./bedGraphToBigWig

Overall, the problem is solved, thank you very much!

ADD REPLY
0
Entering edit mode

Are file and path 2 arguments to chmod or are you passing in a file_path? Similarly, does that change your second command?

Can you post the actual commands and error messages?

ADD REPLY
0
Entering edit mode

I've edited the question to make it more clear.

ADD REPLY

Login before adding your answer.

Traffic: 2044 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6