JAL-1807 still testing
[jalviewjs.git] / bin / jalview / workers / ConservationThread.js
index d790876..dc839a9 100644 (file)
-Clazz.declarePackage ("jalview.workers");
-Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConservationThread", ["jalview.analysis.Conservation", "jalview.schemes.ResidueProperties", "java.util.ArrayList"], function () {
-c$ = Clazz.decorateAsClass (function () {
-this.ConsPercGaps = 25;
-this.cons = null;
-this.conservation = null;
-this.quality = null;
-Clazz.instantialize (this, arguments);
-}, jalview.workers, "ConservationThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI);
-Clazz.overrideMethod (c$, "getNewWorker", 
-function () {
-return  new jalview.workers.ConservationThread (this.alignViewport, this.ap);
-});
-Clazz.makeConstructor (c$, 
-function (alignViewport, alignPanel) {
-Clazz.superConstructor (this, jalview.workers.ConservationThread, [alignViewport, alignPanel]);
-this.ConsPercGaps = alignViewport.getConsPercGaps ();
-}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel");
-Clazz.overrideMethod (c$, "run1", 
-function (state) {
-while (!Thread.interrupted ()) {
-try {
-switch (state) {
-case 0:
-if (this.calcMan.isPending (this)) return;
-this.calcMan.notifyStart (this);
-state = 3;
-break;
-case 3:
-while (!this.calcMan.notifyWorking (this)) {
-if (this.ap != null) {
-this.ap.paintAlignment (false);
-}try {
-if (this.sleepAndReturn (200, state)) return;
-} catch (e) {
-if (Clazz.exceptionOf (e, InterruptedException)) {
-state = 2;
-break;
-} else {
-throw e;
-}
-}
-}
-if (this.alignViewport.isClosed ()) {
-this.abortAndDestroy ();
-state = 2;
-break;
-}var ourAnnot =  new java.util.ArrayList ();
-this.alignment = this.alignViewport.getAlignment ();
-this.conservation = this.alignViewport.getAlignmentConservationAnnotation ();
-this.quality = this.alignViewport.getAlignmentQualityAnnot ();
-ourAnnot.add (this.conservation);
-ourAnnot.add (this.quality);
-this.ourAnnots = ourAnnot;
-this.ConsPercGaps = this.alignViewport.getConsPercGaps ();
-if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) {
-this.calcMan.workerComplete (this);
-return;
-}state = 4;
-break;
-case 4:
-this.iFirst = this.iLast;
-this.nPer = this.aWidth + 1;
-this.iLast = Math.min (this.iLast + this.nPer, this.aWidth);
-if (this.iLast == this.iFirst) {
-state = 2;
-} else {
-this.computeConsensus ();
-if (this.sleepAndReturn (0, state)) return;
-}break;
-case 2:
-this.updateResultAnnotation (true);
-this.notifyDone ();
-return;
-}
-} catch (e$$) {
-if (Clazz.exceptionOf (e$$, OutOfMemoryError)) {
-var error = e$$;
-{
-this.calcMan.workerCannotRun (this);
-this.ap.raiseOOMWarning ("calculating conservation", error);
-}
-} else {
-var e = e$$;
-{
-System.out.println ("Error in ConsensusThread: " + e);
-e.printStackTrace ();
-this.calcMan.workerComplete (this);
-}
-}
-}
-}
-}, "~N");
-Clazz.defineMethod (c$, "computeConsensus", 
-($fz = function () {
-this.cons = jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.aWidth - 1, false, this.ConsPercGaps, this.quality != null);
-}, $fz.isPrivate = true, $fz));
-Clazz.defineMethod (c$, "updateResultAnnotation", 
-($fz = function (b) {
-if (b || !this.calcMan.isWorking (this) && this.cons != null && this.conservation != null && this.quality != null) {
-this.alignViewport.setConservation (this.cons);
-this.cons.completeAnnotations (this.conservation, this.quality, 0, this.aWidth);
-}}, $fz.isPrivate = true, $fz), "~B");
-Clazz.overrideMethod (c$, "updateAnnotation", 
-function () {
-this.updateResultAnnotation (false);
-});
-});
+Clazz.declarePackage ("jalview.workers");\r
+Clazz.load (["jalview.api.AlignCalcWorkerI", "jalview.workers.AlignCalcWorker"], "jalview.workers.ConservationThread", ["jalview.analysis.Conservation", "jalview.schemes.ResidueProperties", "java.util.ArrayList"], function () {\r
+c$ = Clazz.decorateAsClass (function () {\r
+this.ConsPercGaps = 25;\r
+this.cons = null;\r
+this.conservation = null;\r
+this.quality = null;\r
+Clazz.instantialize (this, arguments);\r
+}, jalview.workers, "ConservationThread", jalview.workers.AlignCalcWorker, jalview.api.AlignCalcWorkerI);\r
+Clazz.overrideMethod (c$, "getNewWorker", \r
+function () {\r
+return  new jalview.workers.ConservationThread (this.alignViewport, this.ap);\r
+});\r
+Clazz.makeConstructor (c$, \r
+function (alignViewport, alignPanel) {\r
+Clazz.superConstructor (this, jalview.workers.ConservationThread, [alignViewport, alignPanel]);\r
+this.ConsPercGaps = alignViewport.getConsPercGaps ();\r
+}, "jalview.api.AlignViewportI,jalview.api.AlignmentViewPanel");\r
+Clazz.overrideMethod (c$, "run1", \r
+function (state) {\r
+while (!Thread.interrupted ()) {\r
+try {\r
+switch (state) {\r
+case 0:\r
+if (this.calcMan.isPending (this)) return;\r
+this.calcMan.notifyStart (this);\r
+state = 3;\r
+break;\r
+case 3:\r
+while (!this.calcMan.notifyWorking (this)) {\r
+if (this.ap != null) {\r
+this.ap.paintAlignment (false);\r
+}try {\r
+if (this.sleepAndReturn (200, state)) return;\r
+} catch (e) {\r
+if (Clazz.exceptionOf (e, InterruptedException)) {\r
+state = 2;\r
+break;\r
+} else {\r
+throw e;\r
+}\r
+}\r
+}\r
+if (this.alignViewport.isClosed ()) {\r
+this.abortAndDestroy ();\r
+state = 2;\r
+break;\r
+}var ourAnnot =  new java.util.ArrayList ();\r
+this.alignment = this.alignViewport.getAlignment ();\r
+this.conservation = this.alignViewport.getAlignmentConservationAnnotation ();\r
+this.quality = this.alignViewport.getAlignmentQualityAnnot ();\r
+ourAnnot.add (this.conservation);\r
+ourAnnot.add (this.quality);\r
+this.ourAnnots = ourAnnot;\r
+this.ConsPercGaps = this.alignViewport.getConsPercGaps ();\r
+if (this.alignment == null || (this.aWidth = this.alignment.getWidth ()) < 0) {\r
+this.calcMan.workerComplete (this);\r
+return;\r
+}state = 4;\r
+break;\r
+case 4:\r
+this.iFirst = this.iLast;\r
+this.nPer = this.aWidth + 1;\r
+this.iLast = Math.min (this.iLast + this.nPer, this.aWidth);\r
+if (this.iLast == this.iFirst) {\r
+state = 2;\r
+} else {\r
+this.computeConsensus ();\r
+if (this.sleepAndReturn (0, state)) return;\r
+}break;\r
+case 2:\r
+this.updateResultAnnotation (true);\r
+this.notifyDone ();\r
+return;\r
+}\r
+} catch (e$$) {\r
+if (Clazz.exceptionOf (e$$, OutOfMemoryError)) {\r
+var error = e$$;\r
+{\r
+this.calcMan.workerCannotRun (this);\r
+this.ap.raiseOOMWarning ("calculating conservation", error);\r
+}\r
+} else {\r
+var e = e$$;\r
+{\r
+System.out.println ("Error in ConsensusThread: " + e);\r
+e.printStackTrace ();\r
+this.calcMan.workerComplete (this);\r
+}\r
+}\r
+}\r
+}\r
+}, "~N");\r
+Clazz.defineMethod (c$, "computeConsensus", \r
+($fz = function () {\r
+this.cons = jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.aWidth - 1, false, this.ConsPercGaps, this.quality != null);\r
+}, $fz.isPrivate = true, $fz));\r
+Clazz.defineMethod (c$, "updateResultAnnotation", \r
+($fz = function (b) {\r
+if (b || !this.calcMan.isWorking (this) && this.cons != null && this.conservation != null && this.quality != null) {\r
+this.alignViewport.setConservation (this.cons);\r
+this.cons.completeAnnotations (this.conservation, this.quality, 0, this.aWidth);\r
+}}, $fz.isPrivate = true, $fz), "~B");\r
+Clazz.overrideMethod (c$, "updateAnnotation", \r
+function () {\r
+this.updateResultAnnotation (false);\r
+});\r
+});\r