From: Jim Procter Date: Tue, 3 Jun 2014 09:20:24 +0000 (+0100) Subject: JAL-1512 fix calculation once again and include score matrix documentation in comment... X-Git-Tag: Release_2_8_1~4^2~5^2~14 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d5538cea7610ca0658449f0bcdb8a7063c3c90fe;p=jalview.git JAL-1512 fix calculation once again and include score matrix documentation in comments in Jalview help --- diff --git a/help/html/calculations/scorematrices.html b/help/html/calculations/scorematrices.html index fb3b0b2..3858b53 100644 --- a/help/html/calculations/scorematrices.html +++ b/help/html/calculations/scorematrices.html @@ -26,8 +26,9 @@

BLOSUM62
@@ -87,7 +88,7 @@ Z02-533-502-20-3-210300-1-1-2-6-1-43 -

Simple Nucleotide Substitution
+

Simple Nucleotide Substitution
This is an ad-hoc matrix which, in addition to penalising mutations between the common nucleotides (ACGT), includes T/U equivalence in order to allow both DNA and/or RNA. In addition, it encodes weak equivalence between R and Y with AG and CTU, respectively, and N is allowed to match any other base weakly. This matrix also includes I (Inosine) and X (Xanthine), but encodes them to weakly match any of (ACGTU), and unfavourably match each other. @@ -109,5 +110,100 @@ In addition, it encodes weak equivalence between R and Y with AG and CTU, respec - introduce a nucleotide substitution matrix that supports RNA/DNA and ambiguity codes +

+ + diff --git a/src/jalview/schemes/ResidueProperties.java b/src/jalview/schemes/ResidueProperties.java index 7dd6520..56faf2a 100755 --- a/src/jalview/schemes/ResidueProperties.java +++ b/src/jalview/schemes/ResidueProperties.java @@ -1425,14 +1425,12 @@ public class ResidueProperties propMatrixEpos = new int[maxProteinIndex][maxProteinIndex]; for (int i=0;ii) { ic+=aa[i]; } else {ic = "-";} - propMatrixF[i][i]=propHash.size(); - propMatrixPos[i][i]=propHash.size(); - propMatrixEpos[i][i]=propHash.size(); for (int j=i+1;j pph=(Map)propHash.get(ph); if (pph.get(ic)!=null && pph.get(jc)!=null) { int icp=pph.get(ic).intValue(),jcp=pph.get(jc).intValue(); - - propMatrixPos[i][j] += icp == jcp ? icp : -1; - propMatrixPos[j][i] += icp == jcp ? icp : -1; - propMatrixF[i][j] += icp == jcp ? 2 : -1; - propMatrixF[j][i] += icp == jcp ? 2 : -1; - propMatrixEpos[i][j] += icp == jcp ? (1+icp * 2) : -1; - propMatrixEpos[j][i] += icp == jcp ? (1+icp * 2) : -1; + // Still working on these definitions. + propMatrixPos[i][j] += icp == jcp && icp>0 ? 2 : 0; + propMatrixPos[j][i] += icp == jcp && icp>0 ? 2 : 0; + propMatrixF[i][j] += icp == jcp ? 2 : 0; + propMatrixF[j][i] += icp == jcp ? 2 : 0; + propMatrixEpos[i][j] += icp == jcp ? (1+icp * 2) : 0; + propMatrixEpos[j][i] += icp == jcp ? (1+icp * 2) : 0; }} + if (maxF