# [BioPython] Changes to SubsMat

**Iddo Friedberg
**
idoerg@cc.huji.ac.il

*Tue, 5 Jun 2001 16:24:56 +0300 (GMT+0300)*

Hi,
I commited a new SubsMat ot the CVS. Changes that will cause code break
are:
1) relative entropy is now in SeqMat.relative_entropy. It is calculated
using the methods SeqMat.make_relative_entropy(obs_freq_mat), where
obs_freq_mat is the observed frequency matrix.
2) Absolute entropy is kept in SeqMat.entropy. It is calculated using
SeqMat.make_entropy()
If this really bugs someone, let me know. I changed the attributes names
as I gather that SubsMat is not being widely used for now, and the current
names reflect better on what they actually do and hold.
Bugfixes:
---------
A zero value in the observed substitutions matrix doesn't crash the
code. That happened because log(0) is undetermined. I'll elaborate on what
I do with a zero value in wiki. Or you can look through the code
documentation for now.
Other changes:
--------------
* Methods for subtraction, addition and multiplication of matrices
* Generation of an expected frequency table from an observed frequency
matrix
* Calculation of linear correlation coefficient between two matrices.
Actually, I commented this out until Bio.Tools.Statistics materializes.
(See Brad's post today on biopython-dev).
* Jensen-Shannon distance between the distributions from which the
matrices are derived. This is a distance function based on the
distribution's entropies.
* Calculates the relative entropy between the distributions of two
matrices. This is a sort of a distance function, only it's not symmetric.
* Can print a full or a half matrix now, formatted.
* Can read a text file with a matrix. More info on Wiki once I get it up.
I'll wiki up some more useful documentation soon.
Iddo
--
Iddo Friedberg | Tel: +972-2-6758647
Dept. of Molecular Genetics and Biotechnology | Fax: +972-2-6757308
The Hebrew University - Hadassah Medical School | email: idoerg@cc.huji.ac.il
POB 12272, Jerusalem 91120 |
Israel |
http://bioinfo.md.huji.ac.il/marg/people-home/iddo/