This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem Running Clustalomegacommandline

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

Is Clustal Omega installed?

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

1 answer

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

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 ;)

Log in to answer this question.