python3 ClustalOmegaCommandline FileNotFoundError
0
0
Entering edit mode
4.2 years ago

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 • 1.1k views
ADD COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

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