Question: python3 ClustalOmegaCommandline FileNotFoundError
gravatar for ani.khachatryan.asdf
2.5 years ago by
ani.khachatryan.asdf0 wrote:


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)

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?


clustal python3 • 732 views
ADD COMMENTlink modified 2.5 years ago • written 2.5 years ago by ani.khachatryan.asdf0

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()
ADD REPLYlink written 2.5 years ago by
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2075 users visited in the last hour