Skip to content

Frequently Asked Questions

Harry Detering edited this page Jun 29, 2016 · 1 revision

Common errors

"No such file or directory"

Not setting the PATH typically results in errors when calling the subprocess module, for instance

Traceback (most recent call last):
  File "./run_project.py", line 113, in <module>
    steps.align_orthologs(ortho_dir, aligned_dir, orthologs, settings, logfile)
  File "/home/harry/code/discomark/discomark/steps.py", line 55, in align_orthologs
    stdout = subprocess.Popen(cline, stdout=subprocess.PIPE, stderr=None).communicate()[0] # this works with python <2.7
  File "/usr/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1340, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

explanation

If you do not have all the required tools (see the README) installed you can use the ones provided with DiscoMark. You must, however, tell your operating system where to find them.

problem source 1: Not setting the PATH

In order to use the provided tools it is critical that your PATH environment variable includes the correct binary path (either discomark/bin/linux or discomark/bin/mac your system)

export PATH=$PATH:$PWD/discomark/bin/linux

problem source 2: setting the PATH from within the wrong directory

When setting the path as mentioned above, the cariable of the environment variable PWD is used to Print the Working Directory you are currently in. The posted command expects that you have just downloaded discomark and have not yet changed inside. Setting the PATH this way from within the discomark directory will result in a wrong path and, subsequently, produce the same error as above.

You can double-check if you are exporting the correct path by listing the directory first:

ls $PWD/discomark/bin/linux

if you see the binary files listed, you are in the correct location:

$ ls $PWD/discomark/bin/linux
blastn  mafft  mafft_libexec  makeblastdb  trimal

problem source 3: unexecutable binaries

By default, the binary files provided with DiscoMark should be executable. If, for some reason, they are not you would receive the same error as above. You can the executabiliy status of the binaries from within the discomark directory like this:

$ ls -lh bin/linux/
total 55M
-rwxrwxr-x 1 harry harry  32M may 18 15:20 blastn
-rwxrwxr-x 1 harry harry  92K may 18 17:57 mafft
drwxrwxr-x 2 harry harry 4,0K may 18 17:57 mafft_libexec
-rwxrwxr-x 1 harry harry  23M may 18 15:20 makeblastdb
-rwxrwxr-x 1 harry harry 242K may 18 13:47 trimal

Make sure that the permissions (in the first output column) include the "executable" bit x. If, instead some of the files have permissions like -rw-rw-r-- you can set the bit using the command:

chmod +x bin/linux/trimal

(replace "trimal" with whichever file is missing the x bit)