This is a test version of Biostars. For the public version, visit https://www.biostars.org.
EMBOSS dosen't output file in biopython

I tried to execute this code using biopython but there is no file for output

from Bio.Emboss.Applications import NeedleCommandline
needle_cline=NeedleCommandline(r"C:\mEMBOSS\needle.exe",asequence="Sequence 1.txt",bsequence="Sequence 2.txt",gapopen=10,gapextend=0.5,outfile="output.txt")
stdout,stderr = needle_cline()

error:

 Traceback (most recent call last):
  File "F:/Study/Bioinformatics/Level 3/Term 1/Bio Computing/Assignment/Assignment 2/Main.py", line 4, in <module>
    stdout,stderr = needle_cline()
  File "C:\Users\moham\anaconda3\lib\site-packages\Bio\Application\__init__.py", line 569, in __call__
    raise ApplicationError(return_code, str(self), stdout_str, stderr_str)
Bio.Application.ApplicationError: Non-zero return code 1 from 'C:\\mEMBOSS\\needle.exe -outfile=output.txt -asequence="Sequence 1.txt" -bsequence="Sequence 2.txt" -gapopen=10 -gapextend=0.5', message 'Died: EMBOSS_ROOT must be defined for Windows'
alignment software error

Do yourself a favour and get used to NOT using whitespaces in folder names, paths and file names. Use underscores or camelcases.

1 answer

The error message tells you what is wrong: 'Died: EMBOSS_ROOT must be defined for Windows'. That means you need to tell the system where EMBOSS files are, which for you seems to be C:\mEMBOSS\. Google windows path variable to find out how to add EMBOSS_ROOT to it.

Log in to answer this question.