[Biopython-dev] Bio.mathfns obsolete? And Bio.clistfns too?

Peter biopython at maubp.freeserve.co.uk
Thu Oct 9 20:56:43 UTC 2008


I'm still in clean up mode!

Until recently Bio.mathfns was used in Bio/NaiveBayes.py but that now
uses numpy more heavily instead.  I think that Bio.mathfns (and its C
implementation) are no longer used anywhere in Biopython (and I would
be surprised if anyone else is using this module).  I'm suggesting
deprecating Bio.mathfns and Bio.cmathfns for the next release.

Similarly, Bio.listfns and its C implementation Bio.clistfns might
also be deprecated with a little effort.  Some of this code seems to
predate things like the python sets module (and its replacement, the
built in set).

Based on a quick grep, only three modules currently use Bio.listfns:
Bio.MarkovModel - uses only listfns.itemindex
Bio.NaiveBayes - uses listfns.itemindex, listfns.items and listfns.contents
Bio.MaxEntropy - uses listfns.itemindex and listfns.items

At first glance, listfns.items(...) might be replaced with
list(set(...)) leaving just two trivial functions listfns.items and
listfns.contents which don't really justify an entrie module (plus C
code).  On the other hand, these may be performance bottlenecks for
Bio.NaiveBayes and Bio.MaxEntropy which could justify keeping the C
code.

Peter



More information about the Biopython-dev mailing list