[BioPython] my brief adventures with 1.00a4 on windows

Brad Chapman chapmanb@arches.uga.edu
Tue, 12 Feb 2002 07:45:21 -0500


Hi Michael;
Thanks for sharing your experiences -- it is really nice to know what
works well and what is a pain in the arse for people just trying
biopython.

> Anyway, back to biopython .. I tried to work through one of the GenBank
> examples in the tutorial/cookbook (which is a *wonderful* document ..
> thanks!) with the following results:
> 
> ActivePython 2.1.1, build 212 (ActiveState)
> Python 2.1.1 (#20, Jul 26 2001, 11:38:51) [MSC 32 bit (Intel)] on win32
> Type "copyright", "credits" or "license" for more information.
> >>> from Bio import GenBank
> >>> gi_list = GenBank.search_for("Opuntia AND rpl16")
> >>> ncbi_dict = GenBank.NCBIDictionary(parser = GenBank.RecordParser())
> >>> f = ncbi_dict[gi_list[0]]
> Traceback (most recent call last):
[...]
> Martel.Parser.ParserPositionException: error parsing at or beyond character 55
> 
> Ick.  

Indeed :-). The problem is that a new GenBank release came out since our
last official release of Biopython and it introduced some incompatible
format changes (namely, they added a "linear" keyword to the LOCUS
line). This is fixed currently in CVS, but I guess we should roll a new
release semi-soon to get this fixed.

> I fiddled around with a couple of things, and decided to just grab
> the most recent cvs tree and install it.  After learning how to make my
> own libpython21.a, I was able to build biopython with mingw with no
> troubles.

Great! I've only compiled on windows with the borland free compiler, so
it is good to hear things'll build with mingw as well.

> Unfortunately, a few of the tests failed.  One of them was
> test_GenBankFormat, which didn't look too promising.

Hmmm...things are a little bit more of a mess in CVS than usual right
now. The problem is that we have a lot of experimental code in there
that the GenBank parser is using (the one that appears to be giving the
tests problem right now is the Format conversion code -- converting
GenBank to FASTA -- I'll have to take a look at that...).

> In the end, I got everything working properly (I think!) by
> 
> 1) Copying over the new version of Martel
> 2) Copying over Bio/Std.py
> 3) Copying over the newest version of genbank_format.py
> 
> Is something in 1.00a4 broken, or did I just have a weird setup?

The parser has the problem with new files, and then things are a little
tricky in CVS with all of the changes to Martel, etc. The ironic thing
is that the fix for 1.00a4 is just a small change to
genbank_format.py

Martel.Str("circular")

to

Martel.Alt(Martel.Str("circular"), Martel.Str("linear"))

I posted a proper patch for this at:

http://www.biopython.org/pipermail/biopython-dev/2002-January/000810.html

if that is easier to deal with.

Anyways, I'm happy to hear you got it working!

> Anyway, I think biopython is the neatest thing I've seen in a while, and
> so does my fiancee, who knows next to nothing about programming, but can
> now use biopython to deal with large numbers of GenBank records.

I'm glad you like it. I'll have to admit though, having a knowledge of
biopython hasn't helped me impress any women recently :-).

Thanks again for letting us know how it worked out.

Maybe-I-can-increase-my-popularity-by-wearing-my-biopython-T-shirt-more-ly
yr's,
Brad