[Biopython-dev] swissprot not working ?

Brad Chapman chapmanb at arches.uga.edu
Wed Aug 22 14:40:05 EDT 2001

Hi Michal;
Thanks for writing. Since you caught me right at the end of writing
e-mails, you get an extra fast response :-)

> I've installed biopython-1.00a2 revently and I'm having some
> unexpected problems:

In short, the problems you are having look like bugs that we have
noticed and squashed since the 1.00a2 release. I'll get into more
detail below, but if you want to "just fix the problems," getting the
latest CVS version should work for you. The biopython source is
available via anonymous CVS, with instructions at:


We also hope to make a new release relatively soon. 

Anyways, the problems you are seeing are due to us, and not you :-)

> 1) swissprot module has some serious problems. Running "swissprot.py"
>    from the "examples" directory gives traceback i am attaching.

There is a (now infamous) bug that snuck into 1.00a2 in which the
first 5 lines of a file will be eaten (under some conditions). The
traceback you are seeing is caused during retrieval of the swissprot
records in the swissprot.py example. The record is retrieved, but is
short the first 5 lines, so the swissprot parser thinks it is malformed.

> 2) installation won't go smoothly. ( I'm sure I've got TextTools
>    installed ;-). The log is in a attachment.

The installation looks good (hey, a majority of the tests passed :-),
but these are also a few bugs in the tests:

> ImportError: cannot import name Sequence

This is caused by an old module Bio.Sequence (which has been replaced
by Bio.Seq), which was referenced in a few places we didn't
expect. This has been fixed.

> Output  : '        key is D61454\012'
> Expected: '        key is F10922\012'

This is caused by different dictionary key orderings under different
version of python. The module itself works fine, but when the output
generated by your version of python is compared to the "golden output"
produced by a different version, the key orderings differ so the
comparison fails. I believe this problem has also been fixed (by
sorting the dictionary keys so they are always standard). But, at any
rate, this is a regression test bug, and shouldn't affect your use of
the module.

Thanks for reporting these problems. We definately like to get
feedback about this sort of thing. I hope this clears things up
and that you enjoy using Biopython! 


More information about the Biopython-dev mailing list