I'm learning Emboss Needle from biopython to align two sequences. When I type in the following comments(used as an example from Biopython cookbook):
from Bio.Emboss.Applications import NeedleCommandline
needle_cline = NeedleCommandline(asequence="alpha.faa", bsequence="beta.faa", gapopen=10, gapextend=0.5, outfile="needle.txt")
print(needle_cline)
It returns: needle -outfile=needle.txt -asequence=alpha.faa -bsequence=beta.faa -gapopen=10 -gapextend=0.5
However, no output file named "needle.txt" is generated. All input files are present. No errors msg appear in the process. Anyone knows what went wrong? Thanks!
Thank you! However, when I type in
It returns:
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Bio/Application/__init__.py", line 516, in __call__ stdout_str, stderr_str) Bio.Application.ApplicationError: Non-zero return code 127 from 'needle -outfile=needle.txt -asequence=alpha.faa -bsequence=beta.faa -gapopen=10 -gapextend=0.5', message '/bin/sh: needle: command not found'
Is there something wrong with PATH?
Probably. It can't find needle in default $PATH.