[Biopython-dev] Martel changes

Andrew Dalke adalke at mindspring.com
Sun Dec 30 08:37:26 EST 2001


I needed to make a few changes to Martel to support the
Bioformat module I was working on.  They are:

INCOMPATIBLE CHANGE:

 - the record readers now support attributes as well as a
tag name.  I forgot to make those changes last summer.

This only affects HeaderFooter and ParseRecord formats.
I couldn't figure out a nice way to make the API backwards
compatible, so used my "it isn't 1.0" perogative.  This
affected a couple of the existing Biopython modules (needed
to add a {}).  I fixed them up and all the regressions pass.

I was able to make the change in such a way that code using
the old API dies immediately, and it includes a hint on what
needs to be changed.


Other changes:
  - a few speed tweaks to the iterator code; my test case of
reading a subset of sprot38 into a SeqRecord object is now
10% faster.  (The 'characters' callback is used a lot, so
I shorted it's path.)

 - the default iterator boundary tag is 'record'

 - it's possible for an expression to go to completion but
allow some text to remain unparsed.  This now throws a new
exception (a subtype of the old one) to allow the handlers
to do something different for that case.  This is used for
the Bioformat format recognition code.

 - Martel.SimpleRecordFilter is used by the Bioformat code
to write a quick test filter, to determine if more
identification work should be done.

                    Andrew
                    dalke at dalkescientific.com





More information about the Biopython-dev mailing list