[BioPython] Clustalw.parse_file errors

Peter biopython at maubp.freeserve.co.uk
Tue Aug 5 20:52:01 UTC 2008


Hi Nick,

I'll take a look at the other problem, but I think I could diagnose
the second one immediately...

> It also doesn't work with the example.aln file here:
> http://www.pasteur.fr/recherche/unites/sis/formation/python/ch11s06.html
> http://www.pasteur.fr/recherche/unites/sis/formation/python/data/example.aln
>
> ...but throws a different error:
>
> code:
>
> c_align = Clustalw.parse_file('example.aln', alphabet=IUPAC.protein)
> =================================
> Traceback (most recent call last):
>  ...
> ValueError: Could not parse line:
>                                           *:::**:.**.** *.*** .:* *:*******
> ====================

That looks like a bug in Biopython 1.47 (reported last month by
Sebastian Bassi) where there was a problem parsing Clustal files where
the first line of the consensus was blank (as here).  It has been
fixed in CVS...

You should only need to replace the file Bio/AlignIO/ClustalIO.py with
the latest version from CVS.  If you would like guidance on how
exactly to update your system please ask - one manual but fairly
simple way is to backup and then replace this file:
/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/Bio/AlignIO/ClustalIO.py
with the latest one from here:
http://cvs.biopython.org/cgi-bin/viewcvs/viewcvs.cgi/biopython/Bio/AlignIO/ClustalIO.py?cvsroot=biopython

If you are happy at the command line, then I would suggest get the
latest version of Biopython from CVS and then re-install from source.

Peter



More information about the Biopython mailing list