This is a test version of Biostars. For the public version, visit https://www.biostars.org.
python3 ClustalOmegaCommandline FileNotFoundError

Hi,

I am trying to do thousands of multiple sequence alignments with python3 using the ClustalOmegaCommandline. For the beginning, I am testing it on one fasta file ('test.fasta') which contains several protein sequences that I want to align. Here is the code that I am using, which is also provided in ClustalOmegaCommandline help.

from Bio.Align.Applications import ClustalOmegaCommandline
in_file = 'test.fasta'
out_file = "aligned.fasta"
clustalomega_cline = ClustalOmegaCommandline(infile=in_file, outfile=out_file, verbose=True, auto=True)
clustalomega_cline()

Here is the error that I get:

FileNotFoundError: [WinError 2] The system cannot find the file specified

I have checked multiple times, everything is fine with the directory and the file is there.What can be causing the error and how can I get the code to work?

Thanks.

python3 clustal

I've never used ClustalOmegaCommandline, but I have used ClustalwCommandline via Python 2.7. This is how I run ClustalwCommandline:

input = sys.argv[1]

clustalw_exe = '/home/bin/clustalw-2.1/src/clustalw2'
clustalw_cline = ClustalwCommandline(clustalw_exe, infile=input)
assert os.path.isfile(clustalw_exe), "Clustal W executable missing"
stdout, stderr = clustalw_cline()

0 answers

No answers yet.

Log in to answer this question.