1 Clazz.declarePackage ("jalview.workers");
2 Clazz.load (["jalview.workers.ConsensusThread"], "jalview.workers.ComplementConsensusThread", ["jalview.analysis.AAFrequency"], function () {
3 c$ = Clazz.decorateAsClass (function () {
5 Clazz.instantialize (this, arguments);
6 }, jalview.workers, "ComplementConsensusThread", jalview.workers.ConsensusThread);
7 Clazz.overrideMethod (c$, "getNewWorker",
9 return new jalview.workers.ComplementConsensusThread (this.alignViewport, this.ap);
11 Clazz.overrideMethod (c$, "getConsensusAnnotation",
13 return this.alignViewport.getComplementConsensusAnnotation ();
15 Clazz.overrideMethod (c$, "getViewportConsensus",
17 return this.alignViewport.getComplementConsensusHash ();
19 Clazz.defineMethod (c$, "initializeCalc",
21 this.mappings = this.alignment.getCodonFrames ();
22 return (this.mappings != null && !this.mappings.isEmpty () && Clazz.superCall (this, jalview.workers.ComplementConsensusThread, "initializeCalc", []));
24 Clazz.overrideMethod (c$, "computeConsensus",
26 for (var i = 0; i < 3; i++) {
28 jalview.analysis.AAFrequency.calculateCdna (this.alignment, this.mappings, this.hconsensus, this.iFirst, this.iLast);
31 if (Clazz.exceptionOf (e, java.util.ConcurrentModificationException)) {
38 Clazz.overrideMethod (c$, "finalizeCalc",
40 this.alignViewport.setComplementConsensusHash (this.hconsensus);
42 Clazz.overrideMethod (c$, "deriveConsensus",
43 function (consensusAnnotation, consensusData) {
44 jalview.analysis.AAFrequency.completeCdnaConsensus (consensusAnnotation, consensusData, this.alignViewport.isShowSequenceLogo (), this.getSequences ().length);
45 }, "jalview.datamodel.AlignmentAnnotation,~A");