Entering edit mode
5.3 years ago
anatolybridge
▴
30
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.
Try this
Also do this before trying above command,
Not sure your command
chmod
s all contents of the directory.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 doingexport PATH=$PATH:/full_path_to_executable
.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!
Are
file
andpath
2 arguments tochmod
or are you passing in afile_path
? Similarly, does that change your second command?Can you post the actual commands and error messages?
I've edited the question to make it more clear.