EMBOSS needle question
2
0
Entering edit mode
10.4 years ago
mossig89 ▴ 10

hello

I'm new to biopython and trying to run the example provided by the biopython documentation section 6.4.5 EMBOSS needle and water:

from Bio.Emboss.Applications import NeedleCommandline
 needle_cline = NeedleCommandline(asequence="alpha.fasta", bsequence="beta.fasta",
                                  gapopen=10, apextend=0.5,outfile="needle.txt")
stdout,stderr=needle_cline()

I have created two .fasta files and saved two sequences in FASTA format and named the files alpha.fasta and beta.fasta respectively in the same directory as the script containing the above given example. whenever it executes the last line (stdout,stderr=needle_cline()) it's giving the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Anaconda\lib\site-packages\Bio\Application\__init__.py", line 513, in __call__
    stdout_str, stderr_str)
Bio.Application.ApplicationError: Non-zero return code 1 from 'needle -outfile=needle.txt -asequence=alpha.fasta -bsequence=beta.fasta -gapopen=10 -gapextend=0.5', message "'needle' is not recognized as an internal or external command,"

I can't figure out why I'm not able to run this simple example, also it is not creating the output file named needle.txt

Thanks in advance

alignment • 5.0k views
ADD COMMENT
1
Entering edit mode
10.2 years ago
cts ★ 1.7k

Have you installed emboss separately and is it in your path? Biopython is saying that 'needle' is not a recognized command, which suggests to me that it is not installed. A quick test for this is at your command line type 'needle' and then enter. If you get a message like 'command not found' then you need to install emboss

ADD COMMENT
0
Entering edit mode

There was a previous answer and comment thread suggesting that "not installed" is the problem. For some reason it has been deleted; I will reopen.

ADD REPLY
0
Entering edit mode

Reopened; it closed again?

ADD REPLY
0
Entering edit mode

I guess the post got deleted somehow, because I remembered that answer solved my problem, I didnt install EMBOSS in the first place.

ADD REPLY

Login before adding your answer.

Traffic: 1605 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6