Problem Running Clustalomegacommandline
1
0
Entering edit mode
11.4 years ago

I'm trying to run an alignment of HA subtypes using ClustalOmega imported from Biopython, and I keep encountering the same error. Here's the code:


from Bio.Align.Applications import ClustalOmegaCommandline
in_file = 'H1.fasta' 
out_file = 'H1_aligned.fasta' 
cline = ClustalOmegaCommandline(infile = in_file, outfile = out_file, verbose = True, auto = True)
cline()

...and here's the error it generates:

ApplicationError: Command 'clustalo -i H1.fasta -o H1_aligned.fasta --auto -v' returned non-zero exit status 127, '/bin/sh: clustalo: command not found'

I've tried re-installing Biopython multiple times with no change. Any suggestions?

biopython clustalw error • 5.6k views
ADD COMMENT
4
Entering edit mode

Is Clustal Omega installed?

ADD REPLY
0
Entering edit mode

That was the problem!! Thank you!

ADD REPLY
0
Entering edit mode

Andreas - do you want to post that as an answer, or should we just close this question?

ADD REPLY
2
Entering edit mode
11.3 years ago
Andreas ★ 2.5k

As suggested by Peter I'll post my comment as answer and elaborate a bit, in case anyone else runs into the same problem:

If a shell command returns 'command not found' it simply means that the executable can't be found. This usually happens when there's a problem with your PATH, if the program in question is not installed or if there was a typo in the command name. In this case, the guess was that Clustal Omega was simply not installed (by default, external programs like Clustal Omega don't come installed with Biopython).

Andreas

ADD COMMENT
0
Entering edit mode

You can mark this as an accepted answer now, I think you get a badge of honour then as a self learner or something like that ;)

ADD REPLY

Login before adding your answer.

Traffic: 1501 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