biopython/biopython — pull request #283 by biologyguy (2014-02-10 01:00:13+00:00)
Title: SubsMat.MatrixInfo

I've added two more matrices to the list (PHAT75/73 and SLIM161, both for transmembrane domains), and a function (mirror_matrix) that will take any of the dictionaries stored in MatrixInfo and return a new dictionary that includes all of the values in both key orders. The reason for the function:
>\>\>\> blosum62 = MatrixInfo.blosum62
>\>\>\> blosum62[("W","F")]
1
>\>\>\> blosum62[("F","W")]
KeyError

but:
>\>\>\> blosum62 = MatrixInfo.mirror_matrix(MatrixInfo.blosum62)
>\>\>\> blosum62[("W","F")]
1
>\>\>\> blosum62[("F","W")]
1