Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jalview / schemes / ScoreMatrix.js
index a12c842..401ab41 100644 (file)
@@ -1,86 +1,86 @@
-Clazz.declarePackage ("jalview.schemes");\r
-Clazz.load (["jalview.analysis.scoremodels.PairwiseSeqScoreModel", "jalview.api.analysis.ScoreModelI"], "jalview.schemes.ScoreMatrix", ["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.name = null;\r
-this.matrix = null;\r
-this.type = 0;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.schemes, "ScoreMatrix", jalview.analysis.scoremodels.PairwiseSeqScoreModel, jalview.api.analysis.ScoreModelI);\r
-Clazz.overrideMethod (c$, "getName", \r
-function () {\r
-return this.name;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (name, matrix, type) {\r
-Clazz.superConstructor (this, jalview.schemes.ScoreMatrix, []);\r
-this.matrix = matrix;\r
-this.type = type;\r
-this.name = name;\r
-}, "~S,~A,~N");\r
-Clazz.overrideMethod (c$, "isDNA", \r
-function () {\r
-return this.type == 1;\r
-});\r
-Clazz.overrideMethod (c$, "isProtein", \r
-function () {\r
-return this.type == 0;\r
-});\r
-Clazz.overrideMethod (c$, "getMatrix", \r
-function () {\r
-return this.matrix;\r
-});\r
-Clazz.defineMethod (c$, "getPairwiseScore", \r
-function (A1, A2) {\r
-return this.getPairwiseScore (A1.charAt (0), A2.charAt (0));\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "getPairwiseScore", \r
-function (c, d) {\r
-var pog = 0;\r
-try {\r
-var a = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)];\r
-var b = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[d.charCodeAt (0)];\r
-pog = this.matrix[a][b];\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, Exception)) {\r
-} else {\r
-throw e;\r
-}\r
-}\r
-return pog;\r
-}, "~S,~S");\r
-Clazz.overrideMethod (c$, "toString", \r
-function () {\r
-return this.outputMatrix (false);\r
-});\r
-Clazz.defineMethod (c$, "outputMatrix", \r
-function (html) {\r
-var sb =  new StringBuffer ();\r
-var symbols = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex : jalview.schemes.ResidueProperties.nucleotideIndex;\r
-var symMax = (this.type == 0) ? 23 : 10;\r
-var header = true;\r
-if (html) {\r
-sb.append ("<table border=\"1\">");\r
-}for (var sym = 'A'; sym <= 'Z'; sym = String.fromCharCode (sym.charCodeAt (0) + 1)) {\r
-if (symbols[sym.charCodeAt (0)] >= 0 && symbols[sym.charCodeAt (0)] < symMax) {\r
-if (header) {\r
-sb.append (html ? "<tr><td></td>" : "");\r
-for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) {\r
-if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) {\r
-sb.append ((html ? "<td>&nbsp;" : "\t") + sym2 + (html ? "&nbsp;</td>" : ""));\r
-}}\r
-header = false;\r
-sb.append (html ? "</tr>\n" : "\n");\r
-}if (html) {\r
-sb.append ("<tr>");\r
-}sb.append ((html ? "<td>" : "") + sym + (html ? "</td>" : ""));\r
-for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) {\r
-if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) {\r
-sb.append ((html ? "<td>" : "\t") + this.matrix[symbols[sym.charCodeAt (0)]][symbols[sym2.charCodeAt (0)]] + (html ? "</td>" : ""));\r
-}}\r
-sb.append (html ? "</tr>\n" : "\n");\r
-}}\r
-if (html) {\r
-sb.append ("</table>");\r
-}return sb.toString ();\r
-}, "~B");\r
-});\r
+Clazz.declarePackage ("jalview.schemes");
+Clazz.load (["jalview.analysis.scoremodels.PairwiseSeqScoreModel", "jalview.api.analysis.ScoreModelI"], "jalview.schemes.ScoreMatrix", ["jalview.schemes.ResidueProperties", "java.lang.StringBuffer"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.name = null;
+this.matrix = null;
+this.type = 0;
+Clazz.instantialize (this, arguments);
+}, jalview.schemes, "ScoreMatrix", jalview.analysis.scoremodels.PairwiseSeqScoreModel, jalview.api.analysis.ScoreModelI);
+Clazz.overrideMethod (c$, "getName", 
+function () {
+return this.name;
+});
+Clazz.makeConstructor (c$, 
+function (name, matrix, type) {
+Clazz.superConstructor (this, jalview.schemes.ScoreMatrix, []);
+this.matrix = matrix;
+this.type = type;
+this.name = name;
+}, "~S,~A,~N");
+Clazz.overrideMethod (c$, "isDNA", 
+function () {
+return this.type == 1;
+});
+Clazz.overrideMethod (c$, "isProtein", 
+function () {
+return this.type == 0;
+});
+Clazz.overrideMethod (c$, "getMatrix", 
+function () {
+return this.matrix;
+});
+Clazz.defineMethod (c$, "getPairwiseScore", 
+function (A1, A2) {
+return this.getPairwiseScore (A1.charAt (0), A2.charAt (0));
+}, "~S,~S");
+Clazz.defineMethod (c$, "getPairwiseScore", 
+function (c, d) {
+var pog = 0;
+try {
+var a = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[c.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[c.charCodeAt (0)];
+var b = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex[d.charCodeAt (0)] : jalview.schemes.ResidueProperties.nucleotideIndex[d.charCodeAt (0)];
+pog = this.matrix[a][b];
+} catch (e) {
+if (Clazz.exceptionOf (e, Exception)) {
+} else {
+throw e;
+}
+}
+return pog;
+}, "~S,~S");
+Clazz.overrideMethod (c$, "toString", 
+function () {
+return this.outputMatrix (false);
+});
+Clazz.defineMethod (c$, "outputMatrix", 
+function (html) {
+var sb =  new StringBuffer ();
+var symbols = (this.type == 0) ? jalview.schemes.ResidueProperties.aaIndex : jalview.schemes.ResidueProperties.nucleotideIndex;
+var symMax = (this.type == 0) ? 23 : 10;
+var header = true;
+if (html) {
+sb.append ("<table border=\"1\">");
+}for (var sym = 'A'; sym <= 'Z'; sym = String.fromCharCode (sym.charCodeAt (0) + 1)) {
+if (symbols[sym.charCodeAt (0)] >= 0 && symbols[sym.charCodeAt (0)] < symMax) {
+if (header) {
+sb.append (html ? "<tr><td></td>" : "");
+for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) {
+if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) {
+sb.append ((html ? "<td>&nbsp;" : "\t") + sym2 + (html ? "&nbsp;</td>" : ""));
+}}
+header = false;
+sb.append (html ? "</tr>\n" : "\n");
+}if (html) {
+sb.append ("<tr>");
+}sb.append ((html ? "<td>" : "") + sym + (html ? "</td>" : ""));
+for (var sym2 = 'A'; sym2 <= 'Z'; sym2 = String.fromCharCode (sym2.charCodeAt (0) + 1)) {
+if (symbols[sym2.charCodeAt (0)] >= 0 && symbols[sym2.charCodeAt (0)] < symMax) {
+sb.append ((html ? "<td>" : "\t") + this.matrix[symbols[sym.charCodeAt (0)]][symbols[sym2.charCodeAt (0)]] + (html ? "</td>" : ""));
+}}
+sb.append (html ? "</tr>\n" : "\n");
+}}
+if (html) {
+sb.append ("</table>");
+}return sb.toString ();
+}, "~B");
+});