[BioPython] Error generated by Clustalw example in Tutorial

Peter biopython at maubp.freeserve.co.uk
Fri Oct 5 09:26:06 UTC 2007


Y Tu wrote:
> Hi,
> 
> I'm reading the Biopython tutorial and running the example of clustalw. But it generate the following error. What's wrong? Thanks.
> 
>>>> from Bio import Clustalw
>>>> cline = Clustalw.MultipleAlignCL(os.path.join(os.curdir, "opuntia.fasta"))
>>>> cline.set_output("result.aln")
>>>> print cline
> clustalw .\opuntia.fasta -OUTFILE=result.aln

The Windows version of ClustalW is very fussy.  To experiment try 
running this by hand at the windows command prompt - note that I'm not 
at my Windows machine so I haven't double checked this:

clustalw .\opuntia.fasta -OUTFILE=result.aln

or,

clustalw opuntia.fasta -OUTFILE=result.aln

Any error messages would be helpful.

I suggest you try this in Biopython:

from Bio import Clustalw
cline = Clustalw.MultipleAlignCL("opuntia.fasta")
cline.set_output("result.aln")
print cline

Also, we have made a few tweaks to this code since Biopython 1.43 was 
released (see emails with Emanuel Hey in July 2007).  If you like, you 
can try updating this module to the CVS version.  Simply backup the 
existing C:\Python25\Lib\site-packages\Bio\Clustalw\__init__.py and 
replace it with the latest code from here:

http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/*checkout*/biopython/Bio/Clustalw/__init__.py?rev=HEAD&cvsroot=biopython&content-type=text/x-python

Peter




More information about the Biopython mailing list