[Biopython-dev] Deprecating Bio.mathfns, Bio.stringfns and their C code?

Bruce Southey bsouthey at gmail.com
Thu Oct 23 18:50:06 UTC 2008


Peter wrote:
> Bruce:
>   
>> Peter:
>>     
>>> Any objections to deprecating Bio.mathfns and Bio.cmathfns?
>>>       
>> Nope, the functions used by Bio/NaiveBayes.py are ...
>>     
>
> You must be looking at Bio/NaiveBayes.py an older CVS checkout - it
> doesn't use Bio.mathfns at all now, but rather makes more use of
> numpy.
>   
Sorry, yes, I just pulled a new cvs version and I now see that it has 
been removed.

>   
>>> We could just label Bio.listfns (and Bio.clistfns) as obsolete for the
>>> next release, or just add a note in the docstring that this might be
>>> deprecated shortly.
>>>       
>> Used by:
>> Bio/MaxEntropy.py
>> Bio/NaiveBayes.py
>> Bio/MarkovModel.py
>> Bio/pairwise2.py
>>
>> Functions directly used:
>> ...
>> At present I do not know enough about Bio/MaxEntropy.py, Bio/NaiveBayes.py,
>> and Bio/MarkovModel.py to indicate if Bio.listfns functions are really
>> required or to port them to numpy. (I may try look at trying to port them
>> but not soon.)
>>     
>
> I haven't dug too deeply either - which is why I wasn't going to push
> to deprecate Bio.listfns yet.
>
> I did mention some of this in the earlier email, but you have gone
> into more detail.
> http://lists.open-bio.org/pipermail/biopython-dev/2008-October/004406.html
>
> As you will have noticed, many of the things in Bio.listfns could
> nowadays be done in pure python with a set.
>   
My brief look at the function defined by Bio.listfns indicated that 
these were only useful if a list could not be converted into a 
dictionary. I am not sure that this is required at least for 
Bio/MaxEntropy.py, Bio/NaiveBayes.py, and Bio/MarkovModel.py.  
Personally I would be inclined to incorporate Bio.listfns into each of 
these and depreciate Bio.listfns. I know this is duplication but 
hopefully this would be addressed if someone updates the code.

Bruce




More information about the Biopython-dev mailing list