JAL-1807 test
[jalviewjs.git] / bin / jalview / io / TCoffeeScoreFile.js
index 1036432..7f2d629 100644 (file)
-Clazz.declarePackage ("jalview.io");\r
-Clazz.load (["jalview.io.AlignFile", "java.awt.Color", "java.util.LinkedHashMap", "java.util.regex.Pattern"], "jalview.io.TCoffeeScoreFile", ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.Annotation", "jalview.util.Comparison", "java.lang.StringBuilder", "java.util.ArrayList", "$.HashMap"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.header = null;\r
-this.scores = null;\r
-this.fWidth = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.io, "TCoffeeScoreFile", jalview.io.AlignFile);\r
-Clazz.defineMethod (c$, "getHeight", \r
-function () {\r
-return this.scores != null && this.scores.size () > 0 ? this.scores.size () - 1 : 0;\r
-});\r
-Clazz.defineMethod (c$, "getWidth", \r
-function () {\r
-return this.fWidth != null ? this.fWidth : 0;\r
-});\r
-Clazz.defineMethod (c$, "getScoresFor", \r
-function (id) {\r
-return this.scores != null && this.scores.containsKey (id) ? this.scores.get (id).toString () : "";\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getScoresList", \r
-function () {\r
-if (this.scores == null) {\r
-return null;\r
-}var result =  new java.util.ArrayList (this.scores.size ());\r
-for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) {\r
-result.add (it.getValue ().toString ());\r
-}\r
-return result;\r
-});\r
-Clazz.defineMethod (c$, "getScoresArray", \r
-function () {\r
-if (this.scores == null) {\r
-return null;\r
-}var result =  Clazz.newByteArray (this.scores.size (), 0);\r
-var rowCount = 0;\r
-for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) {\r
-var line = it.getValue ().toString ();\r
-var seqValues =  Clazz.newByteArray (line.length, 0);\r
-for (var j = 0, c = line.length; j < c; j++) {\r
-var val = (line.charCodeAt (j) - 48);\r
-seqValues[j] = (val >= 0 && val <= 9) ? val : -1;\r
-}\r
-result[rowCount++] = seqValues;\r
-}\r
-return result;\r
-});\r
-Clazz.overrideMethod (c$, "parse", \r
-function () {\r
-this.header = jalview.io.TCoffeeScoreFile.readHeader (this);\r
-if (this.header == null) {\r
-this.error = true;\r
-return;\r
-}this.scores =  new java.util.LinkedHashMap ();\r
-for (var entry, $entry = this.header.scores.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {\r
-this.scores.put (entry.getKey (),  new StringBuilder ());\r
-}\r
-var block;\r
-while ((block = jalview.io.TCoffeeScoreFile.readBlock (this, this.header.scores.size ())) != null) {\r
-for (var entry, $entry = block.items.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {\r
-var scoreStringBuilder = this.scores.get (entry.getKey ());\r
-if (scoreStringBuilder == null) {\r
-this.error = true;\r
-this.errormessage = String.format ("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section", [entry.getKey ()]);\r
-return;\r
-}scoreStringBuilder.append (entry.getValue ());\r
-}\r
-}\r
-for (var str, $str = this.scores.values ().iterator (); $str.hasNext () && ((str = $str.next ()) || true);) {\r
-if (this.fWidth == null) {\r
-this.fWidth = new Integer (str.length ());\r
-} else if ((this.fWidth).intValue () !== str.length ()) {\r
-this.error = true;\r
-this.errormessage = "Invalid T-Coffee score file: All the score sequences must have the same length";\r
-return;\r
-}}\r
-return;\r
-});\r
-c$.parseInt = Clazz.defineMethod (c$, "parseInt", \r
-function (str) {\r
-try {\r
-return Integer.parseInt (str);\r
-} catch (e) {\r
-if (Clazz.exceptionOf (e, NumberFormatException)) {\r
-return 0;\r
-} else {\r
-throw e;\r
-}\r
-}\r
-}, "~S");\r
-c$.readHeader = Clazz.defineMethod (c$, "readHeader", \r
-function (reader) {\r
-var result = null;\r
-try {\r
-result =  new jalview.io.TCoffeeScoreFile.Header ();\r
-result.head = reader.nextLine ();\r
-var line;\r
-while ((line = reader.nextLine ()) != null) {\r
-if (line.startsWith ("SCORE=")) {\r
-result.score = jalview.io.TCoffeeScoreFile.parseInt (line.substring (6).trim ());\r
-break;\r
-}}\r
-if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) {\r
-jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");\r
-return null;\r
-}if ((line = reader.nextLine ()) == null || !"BAD AVG GOOD".equals (line.trim ())) {\r
-jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");\r
-return null;\r
-}if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) {\r
-jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");\r
-return null;\r
-}while ((line = reader.nextLine ()) != null) {\r
-if ("".equals (line)) {\r
-break;\r
-}var p = line.indexOf (":");\r
-if (p == -1) {\r
-continue;\r
-}var id = line.substring (0, p).trim ();\r
-var val = jalview.io.TCoffeeScoreFile.parseInt (line.substring (p + 1).trim ());\r
-if ("".equals (id)) {\r
-continue;\r
-}result.scores.put (id, new Integer (val));\r
-}\r
-if (result == null) {\r
-jalview.io.TCoffeeScoreFile.error (reader, "T-COFFEE score file had no per-sequence scores");\r
-}} catch (e) {\r
-if (Clazz.exceptionOf (e, java.io.IOException)) {\r
-jalview.io.TCoffeeScoreFile.error (reader, "Unexpected problem parsing T-Coffee score ascii file");\r
-throw e;\r
-} else {\r
-throw e;\r
-}\r
-}\r
-return result;\r
-}, "jalview.io.FileParse");\r
-c$.error = Clazz.defineMethod (c$, "error", \r
-($fz = function (reader, errm) {\r
-reader.error = true;\r
-if (reader.errormessage == null) {\r
-reader.errormessage = errm;\r
-} else {\r
-reader.errormessage += "\n" + errm;\r
-}}, $fz.isPrivate = true, $fz), "jalview.io.FileParse,~S");\r
-c$.readBlock = Clazz.defineMethod (c$, "readBlock", \r
-function (reader, size) {\r
-var result =  new jalview.io.TCoffeeScoreFile.Block (size);\r
-var line;\r
-while ((line = reader.nextLine ()) != null && "".equals (line.trim ())) {\r
-}\r
-if (line == null) {\r
-return null;\r
-}do {\r
-if ("".equals (line.trim ())) {\r
-break;\r
-}var p = line.indexOf (" ");\r
-if (p == -1) {\r
-if (reader.warningMessage == null) {\r
-reader.warningMessage = "";\r
-}reader.warningMessage += "Possible parsing error - expected to find a space in line: '" + line + "'\n";\r
-continue;\r
-}var id = line.substring (0, p).trim ();\r
-var val = line.substring (p + 1).trim ();\r
-var m = jalview.io.TCoffeeScoreFile.SCORES_WITH_RESIDUE_NUMS.matcher (val);\r
-if (m.matches ()) {\r
-val = m.group (1);\r
-}result.items.put (id, val);\r
-} while ((line = reader.nextLine ()) != null);\r
-return result;\r
-}, "jalview.io.FileParse,~N");\r
-Clazz.defineMethod (c$, "annotateAlignment", \r
-function (al, matchids) {\r
-if (al.getHeight () != this.getHeight () || al.getWidth () != this.getWidth ()) {\r
-var info = String.format ("align w: %s, h: %s; score: w: %s; h: %s ", [new Integer (al.getWidth ()), new Integer (al.getHeight ()), new Integer (this.getWidth ()), new Integer (this.getHeight ())]);\r
-this.warningMessage = "Alignment shape does not match T-Coffee score file shape -- " + info;\r
-return false;\r
-}var added = false;\r
-var i = 0;\r
-var sidmatcher =  new jalview.analysis.SequenceIdMatcher (al.getSequencesArray ());\r
-var scoreMatrix = this.getScoresArray ();\r
-for (var id, $id = this.scores.entrySet ().iterator (); $id.hasNext () && ((id = $id.next ()) || true);) {\r
-var srow = scoreMatrix[i];\r
-var s;\r
-if (matchids) {\r
-s = sidmatcher.findIdMatch (id.getKey ());\r
-} else {\r
-s = al.getSequenceAt (i);\r
-}i++;\r
-if (s == null && i != this.scores.size () && !id.getKey ().equals ("cons")) {\r
-System.err.println ("No " + (matchids ? "match " : " sequences left ") + " for TCoffee score set : " + id.getKey ());\r
-continue;\r
-}var jSize = al.getWidth () < srow.length ? al.getWidth () : srow.length;\r
-var annotations =  new Array (al.getWidth ());\r
-for (var j = 0; j < jSize; j++) {\r
-var val = srow[j];\r
-if (s != null && jalview.util.Comparison.isGap (s.getCharAt (j))) {\r
-annotations[j] = null;\r
-if (val > 0) {\r
-System.err.println ("Warning: non-zero value for positional T-COFFEE score for gap at " + j + " in sequence " + s.getName ());\r
-}} else {\r
-annotations[j] =  new jalview.datamodel.Annotation (s == null ? "" + val : null, s == null ? "" + val : null, '\0', val * 1, val >= 0 && val < jalview.io.TCoffeeScoreFile.colors.length ? jalview.io.TCoffeeScoreFile.colors[val] : java.awt.Color.white);\r
-}}\r
-var aa = al.findOrCreateAnnotation ("TCoffeeScore", "TCoffeeScore", false, s, null);\r
-if (s != null) {\r
-aa.label = "T-COFFEE";\r
-aa.description = "" + id.getKey ();\r
-aa.annotations = annotations;\r
-aa.visible = false;\r
-aa.belowAlignment = false;\r
-aa.setScore (this.header.getScoreFor (id.getKey ()));\r
-aa.createSequenceMapping (s, s.getStart (), true);\r
-s.addAlignmentAnnotation (aa);\r
-aa.adjustForAlignment ();\r
-} else {\r
-aa.graph = 0;\r
-aa.label = "T-COFFEE";\r
-aa.description = "TCoffee column reliability score";\r
-aa.annotations = annotations;\r
-aa.belowAlignment = true;\r
-aa.visible = true;\r
-aa.setScore (this.header.getScoreAvg ());\r
-}aa.showAllColLabels = true;\r
-aa.validateRangeAndDisplay ();\r
-added = true;\r
-}\r
-return added;\r
-}, "jalview.datamodel.AlignmentI,~B");\r
-Clazz.overrideMethod (c$, "print", \r
-function () {\r
-return "Not valid.";\r
-});\r
-Clazz.pu$h ();\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.head = null;\r
-this.score = 0;\r
-this.scores = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.io.TCoffeeScoreFile, "Header");\r
-Clazz.prepareFields (c$, function () {\r
-this.scores =  new java.util.LinkedHashMap ();\r
-});\r
-Clazz.defineMethod (c$, "getScoreAvg", \r
-function () {\r
-return this.score;\r
-});\r
-Clazz.defineMethod (c$, "getScoreFor", \r
-function (a) {\r
-return this.scores.containsKey (a) ? this.scores.get (a) : -1;\r
-}, "~S");\r
-c$ = Clazz.p0p ();\r
-Clazz.pu$h ();\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.size = 0;\r
-this.items = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.io.TCoffeeScoreFile, "Block");\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.size = a;\r
-this.items =  new java.util.HashMap (a);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getScoresFor", \r
-function (a) {\r
-return this.items.get (a);\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getConsensus", \r
-function () {\r
-return this.items.get ("cons");\r
-});\r
-c$ = Clazz.p0p ();\r
-c$.SCORES_WITH_RESIDUE_NUMS = c$.prototype.SCORES_WITH_RESIDUE_NUMS = java.util.regex.Pattern.compile ("^\\d+\\s([^\\s]+)\\s+\\d+$");\r
-c$.colors = c$.prototype.colors =  Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255),  new java.awt.Color (0, 255, 0),  new java.awt.Color (102, 255, 0),  new java.awt.Color (204, 255, 0),  new java.awt.Color (255, 255, 0),  new java.awt.Color (255, 204, 0),  new java.awt.Color (255, 153, 0),  new java.awt.Color (255, 102, 0),  new java.awt.Color (255, 51, 0),  new java.awt.Color (255, 34, 0)]);\r
-Clazz.defineStatics (c$,\r
-"TCOFFEE_SCORE", "TCoffeeScore");\r
-});\r
+Clazz.declarePackage ("jalview.io");
+Clazz.load (["jalview.io.AlignFile", "java.awt.Color", "java.util.LinkedHashMap", "java.util.regex.Pattern"], "jalview.io.TCoffeeScoreFile", ["jalview.analysis.SequenceIdMatcher", "jalview.datamodel.Annotation", "jalview.util.Comparison", "java.lang.StringBuilder", "java.util.ArrayList", "$.HashMap"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.header = null;
+this.scores = null;
+this.fWidth = null;
+Clazz.instantialize (this, arguments);
+}, jalview.io, "TCoffeeScoreFile", jalview.io.AlignFile);
+Clazz.defineMethod (c$, "getHeight", 
+function () {
+return this.scores != null && this.scores.size () > 0 ? this.scores.size () - 1 : 0;
+});
+Clazz.defineMethod (c$, "getWidth", 
+function () {
+return this.fWidth != null ? this.fWidth : 0;
+});
+Clazz.defineMethod (c$, "getScoresFor", 
+function (id) {
+return this.scores != null && this.scores.containsKey (id) ? this.scores.get (id).toString () : "";
+}, "~S");
+Clazz.defineMethod (c$, "getScoresList", 
+function () {
+if (this.scores == null) {
+return null;
+}var result =  new java.util.ArrayList (this.scores.size ());
+for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) {
+result.add (it.getValue ().toString ());
+}
+return result;
+});
+Clazz.defineMethod (c$, "getScoresArray", 
+function () {
+if (this.scores == null) {
+return null;
+}var result =  Clazz.newByteArray (this.scores.size (), 0);
+var rowCount = 0;
+for (var it, $it = this.scores.entrySet ().iterator (); $it.hasNext () && ((it = $it.next ()) || true);) {
+var line = it.getValue ().toString ();
+var seqValues =  Clazz.newByteArray (line.length, 0);
+for (var j = 0, c = line.length; j < c; j++) {
+var val = (line.charCodeAt (j) - 48);
+seqValues[j] = (val >= 0 && val <= 9) ? val : -1;
+}
+result[rowCount++] = seqValues;
+}
+return result;
+});
+Clazz.overrideMethod (c$, "parse", 
+function () {
+this.header = jalview.io.TCoffeeScoreFile.readHeader (this);
+if (this.header == null) {
+this.error = true;
+return;
+}this.scores =  new java.util.LinkedHashMap ();
+for (var entry, $entry = this.header.scores.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
+this.scores.put (entry.getKey (),  new StringBuilder ());
+}
+var block;
+while ((block = jalview.io.TCoffeeScoreFile.readBlock (this, this.header.scores.size ())) != null) {
+for (var entry, $entry = block.items.entrySet ().iterator (); $entry.hasNext () && ((entry = $entry.next ()) || true);) {
+var scoreStringBuilder = this.scores.get (entry.getKey ());
+if (scoreStringBuilder == null) {
+this.error = true;
+this.errormessage = String.format ("Invalid T-Coffee score file: Sequence ID '%s' is not declared in header section", [entry.getKey ()]);
+return;
+}scoreStringBuilder.append (entry.getValue ());
+}
+}
+for (var str, $str = this.scores.values ().iterator (); $str.hasNext () && ((str = $str.next ()) || true);) {
+if (this.fWidth == null) {
+this.fWidth = new Integer (str.length ());
+} else if ((this.fWidth).intValue () !== str.length ()) {
+this.error = true;
+this.errormessage = "Invalid T-Coffee score file: All the score sequences must have the same length";
+return;
+}}
+return;
+});
+c$.parseInt = Clazz.defineMethod (c$, "parseInt", 
+function (str) {
+try {
+return Integer.parseInt (str);
+} catch (e) {
+if (Clazz.exceptionOf (e, NumberFormatException)) {
+return 0;
+} else {
+throw e;
+}
+}
+}, "~S");
+c$.readHeader = Clazz.defineMethod (c$, "readHeader", 
+function (reader) {
+var result = null;
+try {
+result =  new jalview.io.TCoffeeScoreFile.Header ();
+result.head = reader.nextLine ();
+var line;
+while ((line = reader.nextLine ()) != null) {
+if (line.startsWith ("SCORE=")) {
+result.score = jalview.io.TCoffeeScoreFile.parseInt (line.substring (6).trim ());
+break;
+}}
+if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) {
+jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+return null;
+}if ((line = reader.nextLine ()) == null || !"BAD AVG GOOD".equals (line.trim ())) {
+jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+return null;
+}if ((line = reader.nextLine ()) == null || !"*".equals (line.trim ())) {
+jalview.io.TCoffeeScoreFile.error (reader, "Invalid T-COFFEE score format (NO BAD/AVG/GOOD header)");
+return null;
+}while ((line = reader.nextLine ()) != null) {
+if ("".equals (line)) {
+break;
+}var p = line.indexOf (":");
+if (p == -1) {
+continue;
+}var id = line.substring (0, p).trim ();
+var val = jalview.io.TCoffeeScoreFile.parseInt (line.substring (p + 1).trim ());
+if ("".equals (id)) {
+continue;
+}result.scores.put (id, new Integer (val));
+}
+if (result == null) {
+jalview.io.TCoffeeScoreFile.error (reader, "T-COFFEE score file had no per-sequence scores");
+}} catch (e) {
+if (Clazz.exceptionOf (e, java.io.IOException)) {
+jalview.io.TCoffeeScoreFile.error (reader, "Unexpected problem parsing T-Coffee score ascii file");
+throw e;
+} else {
+throw e;
+}
+}
+return result;
+}, "jalview.io.FileParse");
+c$.error = Clazz.defineMethod (c$, "error", 
+($fz = function (reader, errm) {
+reader.error = true;
+if (reader.errormessage == null) {
+reader.errormessage = errm;
+} else {
+reader.errormessage += "\n" + errm;
+}}, $fz.isPrivate = true, $fz), "jalview.io.FileParse,~S");
+c$.readBlock = Clazz.defineMethod (c$, "readBlock", 
+function (reader, size) {
+var result =  new jalview.io.TCoffeeScoreFile.Block (size);
+var line;
+while ((line = reader.nextLine ()) != null && "".equals (line.trim ())) {
+}
+if (line == null) {
+return null;
+}do {
+if ("".equals (line.trim ())) {
+break;
+}var p = line.indexOf (" ");
+if (p == -1) {
+if (reader.warningMessage == null) {
+reader.warningMessage = "";
+}reader.warningMessage += "Possible parsing error - expected to find a space in line: '" + line + "'\n";
+continue;
+}var id = line.substring (0, p).trim ();
+var val = line.substring (p + 1).trim ();
+var m = jalview.io.TCoffeeScoreFile.SCORES_WITH_RESIDUE_NUMS.matcher (val);
+if (m.matches ()) {
+val = m.group (1);
+}result.items.put (id, val);
+} while ((line = reader.nextLine ()) != null);
+return result;
+}, "jalview.io.FileParse,~N");
+Clazz.defineMethod (c$, "annotateAlignment", 
+function (al, matchids) {
+if (al.getHeight () != this.getHeight () || al.getWidth () != this.getWidth ()) {
+var info = String.format ("align w: %s, h: %s; score: w: %s; h: %s ", [new Integer (al.getWidth ()), new Integer (al.getHeight ()), new Integer (this.getWidth ()), new Integer (this.getHeight ())]);
+this.warningMessage = "Alignment shape does not match T-Coffee score file shape -- " + info;
+return false;
+}var added = false;
+var i = 0;
+var sidmatcher =  new jalview.analysis.SequenceIdMatcher (al.getSequencesArray ());
+var scoreMatrix = this.getScoresArray ();
+for (var id, $id = this.scores.entrySet ().iterator (); $id.hasNext () && ((id = $id.next ()) || true);) {
+var srow = scoreMatrix[i];
+var s;
+if (matchids) {
+s = sidmatcher.findIdMatch (id.getKey ());
+} else {
+s = al.getSequenceAt (i);
+}i++;
+if (s == null && i != this.scores.size () && !id.getKey ().equals ("cons")) {
+System.err.println ("No " + (matchids ? "match " : " sequences left ") + " for TCoffee score set : " + id.getKey ());
+continue;
+}var jSize = al.getWidth () < srow.length ? al.getWidth () : srow.length;
+var annotations =  new Array (al.getWidth ());
+for (var j = 0; j < jSize; j++) {
+var val = srow[j];
+if (s != null && jalview.util.Comparison.isGap (s.getCharAt (j))) {
+annotations[j] = null;
+if (val > 0) {
+System.err.println ("Warning: non-zero value for positional T-COFFEE score for gap at " + j + " in sequence " + s.getName ());
+}} else {
+annotations[j] =  new jalview.datamodel.Annotation (s == null ? "" + val : null, s == null ? "" + val : null, '\0', val * 1, val >= 0 && val < jalview.io.TCoffeeScoreFile.colors.length ? jalview.io.TCoffeeScoreFile.colors[val] : java.awt.Color.white);
+}}
+var aa = al.findOrCreateAnnotation ("TCoffeeScore", "TCoffeeScore", false, s, null);
+if (s != null) {
+aa.label = "T-COFFEE";
+aa.description = "" + id.getKey ();
+aa.annotations = annotations;
+aa.visible = false;
+aa.belowAlignment = false;
+aa.setScore (this.header.getScoreFor (id.getKey ()));
+aa.createSequenceMapping (s, s.getStart (), true);
+s.addAlignmentAnnotation (aa);
+aa.adjustForAlignment ();
+} else {
+aa.graph = 0;
+aa.label = "T-COFFEE";
+aa.description = "TCoffee column reliability score";
+aa.annotations = annotations;
+aa.belowAlignment = true;
+aa.visible = true;
+aa.setScore (this.header.getScoreAvg ());
+}aa.showAllColLabels = true;
+aa.validateRangeAndDisplay ();
+added = true;
+}
+return added;
+}, "jalview.datamodel.AlignmentI,~B");
+Clazz.overrideMethod (c$, "print", 
+function () {
+return "Not valid.";
+});
+Clazz.pu$h ();
+c$ = Clazz.decorateAsClass (function () {
+this.head = null;
+this.score = 0;
+this.scores = null;
+Clazz.instantialize (this, arguments);
+}, jalview.io.TCoffeeScoreFile, "Header");
+Clazz.prepareFields (c$, function () {
+this.scores =  new java.util.LinkedHashMap ();
+});
+Clazz.defineMethod (c$, "getScoreAvg", 
+function () {
+return this.score;
+});
+Clazz.defineMethod (c$, "getScoreFor", 
+function (a) {
+return this.scores.containsKey (a) ? this.scores.get (a) : -1;
+}, "~S");
+c$ = Clazz.p0p ();
+Clazz.pu$h ();
+c$ = Clazz.decorateAsClass (function () {
+this.size = 0;
+this.items = null;
+Clazz.instantialize (this, arguments);
+}, jalview.io.TCoffeeScoreFile, "Block");
+Clazz.makeConstructor (c$, 
+function (a) {
+this.size = a;
+this.items =  new java.util.HashMap (a);
+}, "~N");
+Clazz.defineMethod (c$, "getScoresFor", 
+function (a) {
+return this.items.get (a);
+}, "~S");
+Clazz.defineMethod (c$, "getConsensus", 
+function () {
+return this.items.get ("cons");
+});
+c$ = Clazz.p0p ();
+c$.SCORES_WITH_RESIDUE_NUMS = c$.prototype.SCORES_WITH_RESIDUE_NUMS = java.util.regex.Pattern.compile ("^\\d+\\s([^\\s]+)\\s+\\d+$");
+c$.colors = c$.prototype.colors =  Clazz.newArray (-1, [ new java.awt.Color (102, 102, 255),  new java.awt.Color (0, 255, 0),  new java.awt.Color (102, 255, 0),  new java.awt.Color (204, 255, 0),  new java.awt.Color (255, 255, 0),  new java.awt.Color (255, 204, 0),  new java.awt.Color (255, 153, 0),  new java.awt.Color (255, 102, 0),  new java.awt.Color (255, 51, 0),  new java.awt.Color (255, 34, 0)]);
+Clazz.defineStatics (c$,
+"TCOFFEE_SCORE", "TCoffeeScore");
+});