issues with new version

30 views
Skip to first unread message

Nicholas Lucaroni

unread,
Dec 12, 2011, 4:33:44 PM12/12/11
to SATe User
I'm having some problems running sate2 on a 64bit linux machine. One
issue I ran into and solved was in specifying the paths to the aligner
and other programs in sate_tools_paths.cfg,

[mafft]
path = ...

does not work, and should be [mafft aligner]. The output messages in
running the application allude to this, but the documentation on your
website does not reflect the change.

Once it could find the location of mafft, sate is trying to execute
mafft like,

"/usr/local/bin/python" "/home/nlucaroni/bin/bin/mafft" "--localpair"
"--maxiterate" "1000" "--ep" "0.123" "--quiet" "/home/nlucaroni/.sate/
test/tempzXcvPh/step0/centroid/d1/d1/tempmafftFcHQ8I/input.fasta"

Of course, mafft is not a python script, and this errors instantly. It
should be executed by bash, or directly. Changing the above directly
to an invocation through bash on the command line is successful.

Thanks for any help,

Nicholas Lucaroni

unread,
Dec 12, 2011, 4:51:43 PM12/12/11
to SATe User
Should the path actually be to a script you've provided in sate-core/
resources/scripts/mafft ?

Even so, modifying the [mafft aligner] to that script causes an error
(follows). It looked like it may have been permission issues, but
setting them to 777 did not change anything --for the executing folder
and .sate folder.

I'm running python 2.7.2+.

The invocation that failed was:
"/usr/local/bin/python" "/home/nlucaroni/sate_all/sate2/sate-core/
resources/scripts/mafft" "--localpair" "--maxiterate" "1000" "--ep"
"0.123" "--quiet" "/home/nlucaroni/.sate/test/tempiWGJeN/step0/
centroid/d1/d1/tempmafftJNbd1h/input.fasta"

Traceback (most recent call last):
File "/home/nlucaroni/sate_all/sate2/sate-core/resources/scripts/
mafft", line 226, in <module>
main()
File "/home/nlucaroni/sate_all/sate2/sate-core/resources/scripts/
mafft", line 130, in main
copy_file(np, newdir)
File "/home/nlucaroni/sate_all/sate2/sate-core/resources/scripts/
mafft", line 46, in copy_file
shutil.copy(src, dest)
File "/usr/lib/python2.7/shutil.py", line 116, in copy
copyfile(src, dst)
File "/usr/lib/python2.7/shutil.py", line 81, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: '/home/nlucaroni/
sate_all/sate2/sate-core/resources/scripts/real_bin/pairlocalalign'

SATe is exiting because of an error:
global name 'sys' is not defined

On Dec 12, 4:33 pm, Nicholas Lucaroni <nicholas.r.lucar...@gmail.com>
wrote:

Jeet Sukumaran

unread,
Dec 12, 2011, 5:05:55 PM12/12/11
to SATe User
Hi Nicholas,

Thanks for pointing out the lapse on the website. We've updated it
now.

As for the python script issue: you are absolutely correct that the
current implementation of SATe assumes that MAFFT is a Python script.
We hope to provide a more flexible system in the next release. For
immediate use, it might be possible to wrap the command-line
invocation in another Python script that executes the program as you
need.

# /usr/bin/env python
import subprocess
import sys
mafft_program = "/home/nlucaroni/bin/bin/mafft"
cmd = [mafft_program] + sys.argv[1:]
p = subprocess.Popen(cmd)
stdout, stderr = p.communicate()

This script will then be run through the Python VM by SATe, and it in
turn will call the mafft executable with all the arguments that you
pass to it. Yes, it is almost perverse in its convolutions, but it
should work ...


On Dec 12`, 3:33 pm, Nicholas Lucaroni <nicholas.r.lucar...@gmail.com>
wrote:

Jeet Sukumaran

unread,
Dec 12, 2011, 5:22:05 PM12/12/11
to SATe User
The mafft script in the resources/scripts directory is the source
script, and not meant for direct running. When deployed, it gets
copied to the "bin/" directory, where a "real_bin" subdirectory can be
found which is where all the binaries live, and where the mafft script
is hard-coded to look for them. In other words, the mafft script
should not be run directly from the "resources/script" directory, but
from its post-installation location.

If you run:

python setup.py develop

the installer should create a bin directory and symlink the mafft
script into there, as well as correctly populate the "real_bin"
subdirectory with the binaries (assuming that it can find them). Then
the "bin/mafft" will be the correct (sub)path to the production
installation of mafft for SATe.

On Dec 12, 3:51 pm, Nicholas Lucaroni <nicholas.r.lucar...@gmail.com>

Nicholas Lucaroni

unread,
Dec 13, 2011, 3:11:07 PM12/13/11
to SATe User
Not sure what you mean by the usage of the mafft script in the
resources directory.
Regardless, the python script wrapper for mafft works and was
something I was considering but lacked the python knowledge, so it was
much appreciated.
Cheers,
Reply all
Reply to author
Forward
0 new messages