Peter | 5 Jan 2009 14:09
Picon
Picon

Re: [BioPython] do_alignment

On Mon, Jan 5, 2009 at 12:49 PM, Seda Alper <sedaalper <at> yahoo.com> wrote:
> Hi!
>
> I executed the code below about Clustalw . However it doesn't work.
>
> import os
> from Bio.Clustalw import MultipleAlignCL
>
> cline = MultipleAlignCL(os.path.join(os.curdir,"opuntia.fasta"))
> cline.set_output("test.aln")
> print cline
>
> from Bio import Clustalw
>
> alignment = Clustalw.do_alignment(cline)
>
> The error like that
>>>>
> clustalw -INFILE=.\opuntia.fasta -OUTFILE=test.aln
>
> Traceback (most recent call last):
>  File "C:\Python25\ders\se.py", line 10, in <module>
>    alignment = Clustalw.do_alignment(cline)
>  File "C:\Python25\Lib\site-packages\Bio\Clustalw\__init__.py", line 95, in do_alignment
>    shell=(sys.platform!="win32")
>  File "C:\Python25\lib\subprocess.py", line 594, in __init__
>    errread, errwrite)
>  File "C:\Python25\lib\subprocess.py", line 816, in _execute_child
>    startupinfo)
> WindowsError: [Error 2] The system cannot find the file specified
>
> What to do?
>
> Thanks
> Seda

I'm not at my Windows machine to double check this, but I suspect you
don't have clustalw on your path.  If you don't have clustalw on your
path, you'll have to tell Biopython where it is:

clustalw_exe = r"C:\Program Files\...\clustalw.exe"
assert os.path.isfile(clustalw_exe)
cline = MultipleAlignCL(os.path.join(os.curdir,"opuntia.fasta"), clustalw_exe)
...

Peter
_______________________________________________
BioPython mailing list  -  BioPython <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython


Gmane