The $PATH variable is an environmental variable of Linux that contains several paths that you'd like to have ready everywhere you are with your command line (this is probably the worst definition of $PATH ever but I think it helps you getting the point since you're new to Linux).
If you echo $PATH
you will see it.
If you are inside the directory where bed_to_juncs is, and the bed_to_juncs file is executable, then if you type bed_to_juncs
and press Enter the command will run. To see if it is executable just do:
ls -l /your/path/to/bed_to_juncs
and you will see something like:
-rwxr-xr-x 1 root root 1925 Feb 23 2016 /software/tophat/tophat-2.1.0/bin/bed_to_juncs
If you subdivide the first part, you get groups of 3: rwx | r-x | r-x . The first group refers to the user, which is you, the second to the usergroup, which is sometimes just you but in some systems is a group of users, and the third group refers to all. r refers to read, w is write, x is execute. There must be an x in the first group for you to execute that file.
Coming back to what the $PATH is, if your tophat directory is not in the $PATH, you won't be able to call bed_to_juncs from everywhere in your system, but only from the actual bed_to_juncs directory.
To add the path of your bed_to_juncs to the $PATH:
export PATH=$PATH:/your/path/to/bed_to_juncs
Substitute /your/path/to/bed_to_juncs
with your actual one. This should do the trick, if the problem is this one!
If you don't have rwx in your bed_to_juncs file specifications (as discussed above), just run:
chmod u+rwx /your/path/to/bed_to_juncs
This gives read-write-execute permissions to the user, which is you.
Can you perhaps post here the command that doesn't work? Is bed_to_juncs in your $PATH?
The command is
bed_to_juncs junctions.bed new_list.juncs
I'm sorry, but I'm quite new to Linux so could you show me how to check if bed_to_juncs is in $PATH?