[Biopython-dev] FormatIO and SwissProt
Jeffrey Chang
jchang at jeffchang.com
Thu Jul 3 01:28:21 EDT 2003
On Wednesday, July 2, 2003, at 10:03 AM, Yves Bastide wrote:
> Hi,
>
> FormatIO doesn't seem to handle SwissProt files well...
>
> bionix:~/src/bio/biopython/Tests% python
> Python 2.2.2 (#1, Feb 14 2003, 12:23:31)
> [GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from Bio import SeqRecord
>>>> sequence_iterator = SeqRecord.io.readFile(open("SwissProt/sp008"))
> Traceback (most recent call last):
> File "<stdin>", line 1, in ?
> File
> "/.amd/archipel/export/archive/d08/symbiose/ybastide/src/bio/
> biopython/build/lib.linux-i686-2.2/Bio/FormatIO.py", line 97, in
> readFile
> raise TypeError("Could not determine file type")
> TypeError: Could not determine file type
>
> [OK, there are two Swissprot parsers. Erm, why
> */build/lib-*/Bio/FormatIO.py?
> It's certainly not in my path :)]
Is this related to the patch you sent in? This also fails on my
system, but the path points to my usual python path (i.e. not
../build...).
And yes, you've hit the problem right on the nose. There are two
Swiss-Prot parsers. The FormatIO one is still considered experimental,
and is not maintained as well. I'd recommend using the
Bio/SwissProt/SProt parser instead.
Jeff
More information about the Biopython-dev
mailing list