JAL-1807 test
[jalviewjs.git] / bin / jalview / datamodel / SequenceGroup.js
index 0e59a62..b8ea520 100644 (file)
-Clazz.declarePackage ("jalview.datamodel");\r
-Clazz.load (["jalview.datamodel.AnnotatedCollectionI", "java.awt.Color", "java.util.ArrayList"], "jalview.datamodel.SequenceGroup", ["jalview.analysis.AAFrequency", "$.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.lang.StringBuffer"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.groupName = null;\r
-this.description = null;\r
-this.conserve = null;\r
-this.aaFrequency = null;\r
-this.displayBoxes = true;\r
-this.displayText = true;\r
-this.colourText = false;\r
-this.showNonconserved = false;\r
-this.sequences = null;\r
-this.seqrep = null;\r
-this.width = -1;\r
-this.cs = null;\r
-this.startRes = 0;\r
-this.endRes = 0;\r
-this.outlineColour = null;\r
-this.idColour = null;\r
-this.thresholdTextColour = 0;\r
-this.textColour = null;\r
-this.textColour2 = null;\r
-this.ignoreGapsInConsensus = true;\r
-this.showSequenceLogo = false;\r
-this.normaliseSequenceLogo = false;\r
-this.consPercGaps = 25;\r
-this.consensusData = null;\r
-this.hidereps = false;\r
-this.hidecols = false;\r
-this.consensus = null;\r
-this.conservation = null;\r
-this.showConsensusHistogram = false;\r
-this.context = null;\r
-Clazz.instantialize (this, arguments);\r
-}, jalview.datamodel, "SequenceGroup", null, jalview.datamodel.AnnotatedCollectionI);\r
-Clazz.prepareFields (c$, function () {\r
-this.sequences =  new java.util.ArrayList ();\r
-this.outlineColour = java.awt.Color.black;\r
-this.textColour = java.awt.Color.black;\r
-this.textColour2 = java.awt.Color.white;\r
-});\r
-Clazz.defineMethod (c$, "isShowSequenceLogo", \r
-function () {\r
-return this.showSequenceLogo;\r
-});\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.groupName = "JGroup:" + this.hashCode ();\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (sequences, groupName, scheme, displayBoxes, displayText, colourText, start, end) {\r
-this.sequences = sequences;\r
-this.groupName = groupName;\r
-this.displayBoxes = displayBoxes;\r
-this.displayText = displayText;\r
-this.colourText = colourText;\r
-this.cs = scheme;\r
-this.startRes = start;\r
-this.endRes = end;\r
-this.recalcConservation ();\r
-}, "java.util.List,~S,jalview.schemes.ColourSchemeI,~B,~B,~B,~N,~N");\r
-Clazz.makeConstructor (c$, \r
-function (seqsel) {\r
-if (seqsel != null) {\r
-this.sequences =  new java.util.ArrayList ();\r
-this.sequences.addAll (seqsel.sequences);\r
-if (seqsel.groupName != null) {\r
-this.groupName =  String.instantialize (seqsel.groupName);\r
-}this.displayBoxes = seqsel.displayBoxes;\r
-this.displayText = seqsel.displayText;\r
-this.colourText = seqsel.colourText;\r
-this.startRes = seqsel.startRes;\r
-this.endRes = seqsel.endRes;\r
-this.cs = seqsel.cs;\r
-if (seqsel.description != null) {\r
-this.description =  String.instantialize (seqsel.description);\r
-}this.hidecols = seqsel.hidecols;\r
-this.hidereps = seqsel.hidereps;\r
-this.idColour = seqsel.idColour;\r
-this.outlineColour = seqsel.outlineColour;\r
-this.seqrep = seqsel.seqrep;\r
-this.textColour = seqsel.textColour;\r
-this.textColour2 = seqsel.textColour2;\r
-this.thresholdTextColour = seqsel.thresholdTextColour;\r
-this.width = seqsel.width;\r
-this.ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus;\r
-if (seqsel.conserve != null) {\r
-this.recalcConservation ();\r
-}}}, "jalview.datamodel.SequenceGroup");\r
-Clazz.defineMethod (c$, "getSelectionAsNewSequences", \r
-function (align) {\r
-var iSize = this.sequences.size ();\r
-var seqs =  new Array (iSize);\r
-var inorder = this.getSequencesInOrder (align);\r
-for (var i = 0, ipos = 0; i < inorder.length; i++) {\r
-var seq = inorder[i];\r
-seqs[ipos] = seq.getSubSequence (this.startRes, this.endRes + 1);\r
-if (seqs[ipos] != null) {\r
-seqs[ipos].setDescription (seq.getDescription ());\r
-seqs[ipos].setDBRef (seq.getDBRef ());\r
-seqs[ipos].setSequenceFeatures (seq.getSequenceFeatures ());\r
-if (seq.getDatasetSequence () != null) {\r
-seqs[ipos].setDatasetSequence (seq.getDatasetSequence ());\r
-}if (seq.getAnnotation () != null) {\r
-var alann = align.getAlignmentAnnotation ();\r
-for (var a = 0; a < seq.getAnnotation ().length; a++) {\r
-var tocopy = seq.getAnnotation ()[a];\r
-if (alann != null) {\r
-var found = false;\r
-for (var pos = 0; pos < alann.length; pos++) {\r
-if (alann[pos] === tocopy) {\r
-found = true;\r
-break;\r
-}}\r
-if (!found) {\r
-continue;\r
-}}var newannot =  new jalview.datamodel.AlignmentAnnotation (seq.getAnnotation ()[a]);\r
-newannot.restrict (this.startRes, this.endRes);\r
-newannot.setSequenceRef (seqs[ipos]);\r
-newannot.adjustForAlignment ();\r
-seqs[ipos].addAlignmentAnnotation (newannot);\r
-}\r
-}ipos++;\r
-} else {\r
-iSize--;\r
-}}\r
-if (iSize != inorder.length) {\r
-var nseqs =  new Array (iSize);\r
-System.arraycopy (seqs, 0, nseqs, 0, iSize);\r
-seqs = nseqs;\r
-}return seqs;\r
-}, "jalview.datamodel.AlignmentI");\r
-Clazz.defineMethod (c$, "findEndRes", \r
-function (seq) {\r
-var eres = 0;\r
-var ch;\r
-for (var j = 0; j < this.endRes + 1 && j < seq.getLength (); j++) {\r
-ch = seq.getCharAt (j);\r
-if (!jalview.util.Comparison.isGap ((ch))) {\r
-eres++;\r
-}}\r
-if (eres > 0) {\r
-eres += seq.getStart () - 1;\r
-}return eres;\r
-}, "jalview.datamodel.SequenceI");\r
-Clazz.defineMethod (c$, "getSequences", \r
-function () {\r
-return this.sequences;\r
-});\r
-Clazz.defineMethod (c$, "getSequences", \r
-function (hiddenReps) {\r
-if (hiddenReps == null) {\r
-return this.sequences;\r
-} else {\r
-var allSequences =  new java.util.ArrayList ();\r
-for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {\r
-allSequences.add (seq);\r
-if (hiddenReps.containsKey (seq)) {\r
-var hsg = hiddenReps.get (seq);\r
-for (var seq2, $seq2 = hsg.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) {\r
-if (seq2 !== seq && !allSequences.contains (seq2)) {\r
-allSequences.add (seq2);\r
-}}\r
-}}\r
-return allSequences;\r
-}}, "java.util.Map");\r
-Clazz.defineMethod (c$, "getSequencesAsArray", \r
-function (map) {\r
-var tmp = this.getSequences (map);\r
-if (tmp == null) {\r
-return null;\r
-}return tmp.toArray ( new Array (tmp.size ()));\r
-}, "java.util.Map");\r
-Clazz.defineMethod (c$, "adjustForRemoveLeft", \r
-function (col) {\r
-if (this.startRes >= col) {\r
-this.startRes = this.startRes - col;\r
-}if (this.endRes >= col) {\r
-this.endRes = this.endRes - col;\r
-if (this.startRes > this.endRes) {\r
-this.startRes = 0;\r
-}} else {\r
-return false;\r
-}return true;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "adjustForRemoveRight", \r
-function (col) {\r
-if (this.startRes > col) {\r
-return false;\r
-}if (this.endRes >= col) {\r
-this.endRes = col;\r
-}return true;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getName", \r
-function () {\r
-return this.groupName;\r
-});\r
-Clazz.defineMethod (c$, "getDescription", \r
-function () {\r
-return this.description;\r
-});\r
-Clazz.defineMethod (c$, "setName", \r
-function (name) {\r
-this.groupName = name;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "setDescription", \r
-function (desc) {\r
-this.description = desc;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getConservation", \r
-function () {\r
-return this.conserve;\r
-});\r
-Clazz.defineMethod (c$, "setConservation", \r
-function (c) {\r
-this.conserve = c;\r
-}, "jalview.analysis.Conservation");\r
-Clazz.defineMethod (c$, "addSequence", \r
-function (s, recalc) {\r
-{\r
-if (s != null && !this.sequences.contains (s)) {\r
-this.sequences.add (s);\r
-}if (recalc) {\r
-this.recalcConservation ();\r
-}}}, "jalview.datamodel.SequenceI,~B");\r
-Clazz.defineMethod (c$, "getConsPercGaps", \r
-function () {\r
-return this.consPercGaps;\r
-});\r
-Clazz.defineMethod (c$, "setConsPercGaps", \r
-function (consPercGaps) {\r
-this.consPercGaps = consPercGaps;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "recalcConservation", \r
-function () {\r
-if (this.cs == null && this.consensus == null && this.conservation == null) {\r
-return;\r
-}try {\r
-var cnsns = jalview.analysis.AAFrequency.calculate (this.sequences, this.startRes, this.endRes + 1, this.showSequenceLogo);\r
-if (this.consensus != null) {\r
-this._updateConsensusRow (cnsns, this.sequences.size ());\r
-}if (this.cs != null) {\r
-this.cs.setConsensus (cnsns);\r
-}if ((this.conservation != null) || (this.cs != null && this.cs.conservationApplied ())) {\r
-var c =  new jalview.analysis.Conservation (this.groupName, jalview.schemes.ResidueProperties.propHash, 3, this.sequences, this.startRes, this.endRes + 1);\r
-c.calculate ();\r
-c.verdict (false, this.consPercGaps);\r
-if (this.conservation != null) {\r
-this._updateConservationRow (c);\r
-}if (this.cs != null) {\r
-if (this.cs.conservationApplied ()) {\r
-this.cs.setConservation (c);\r
-}}}if (this.cs != null) {\r
-this.cs.alignmentChanged (this.context != null ? this.context : this, null);\r
-}} catch (err) {\r
-if (Clazz.exceptionOf (err, OutOfMemoryError)) {\r
-System.out.println ("Out of memory loading groups: " + err);\r
-} else {\r
-throw err;\r
-}\r
-}\r
-});\r
-Clazz.defineMethod (c$, "_updateConservationRow", \r
-($fz = function (c) {\r
-if (this.conservation == null) {\r
-this.getConservation ();\r
-}this.conservation.label = "Conservation for " + this.getName ();\r
-this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";\r
-var aWidth = (this.conservation.annotations != null) ? (this.endRes < this.conservation.annotations.length ? this.conservation.annotations.length : this.endRes + 1) : this.endRes + 1;\r
-this.conservation.annotations = null;\r
-this.conservation.annotations =  new Array (aWidth);\r
-c.completeAnnotations (this.conservation, null, this.startRes, this.endRes + 1);\r
-}, $fz.isPrivate = true, $fz), "jalview.analysis.Conservation");\r
-Clazz.defineMethod (c$, "_updateConsensusRow", \r
-($fz = function (cnsns, nseq) {\r
-if (this.consensus == null) {\r
-this.getConsensus ();\r
-}this.consensus.label = "Consensus for " + this.getName ();\r
-this.consensus.description = "Percent Identity";\r
-this.consensusData = cnsns;\r
-var aWidth = (this.consensus.annotations != null) ? (this.endRes < this.consensus.annotations.length ? this.consensus.annotations.length : this.endRes + 1) : this.endRes + 1;\r
-this.consensus.annotations = null;\r
-this.consensus.annotations =  new Array (aWidth);\r
-jalview.analysis.AAFrequency.completeConsensus (this.consensus, cnsns, this.startRes, this.endRes + 1, this.ignoreGapsInConsensus, this.showSequenceLogo, nseq);\r
-}, $fz.isPrivate = true, $fz), "~A,~N");\r
-Clazz.defineMethod (c$, "addOrRemove", \r
-function (s, recalc) {\r
-{\r
-if (this.sequences.contains (s)) {\r
-this.deleteSequence (s, recalc);\r
-} else {\r
-this.addSequence (s, recalc);\r
-}}}, "jalview.datamodel.SequenceI,~B");\r
-Clazz.defineMethod (c$, "deleteSequence", \r
-function (s, recalc) {\r
-{\r
-this.sequences.remove (s);\r
-if (recalc) {\r
-this.recalcConservation ();\r
-}}}, "jalview.datamodel.SequenceI,~B");\r
-Clazz.overrideMethod (c$, "getStartRes", \r
-function () {\r
-return this.startRes;\r
-});\r
-Clazz.overrideMethod (c$, "getEndRes", \r
-function () {\r
-return this.endRes;\r
-});\r
-Clazz.defineMethod (c$, "setStartRes", \r
-function (i) {\r
-this.startRes = i;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setEndRes", \r
-function (i) {\r
-this.endRes = i;\r
-}, "~N");\r
-Clazz.defineMethod (c$, "getSize", \r
-function () {\r
-return this.sequences.size ();\r
-});\r
-Clazz.defineMethod (c$, "getSequenceAt", \r
-function (i) {\r
-return this.sequences.get (i);\r
-}, "~N");\r
-Clazz.defineMethod (c$, "setColourText", \r
-function (state) {\r
-this.colourText = state;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getColourText", \r
-function () {\r
-return this.colourText;\r
-});\r
-Clazz.defineMethod (c$, "setDisplayText", \r
-function (state) {\r
-this.displayText = state;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getDisplayText", \r
-function () {\r
-return this.displayText;\r
-});\r
-Clazz.defineMethod (c$, "setDisplayBoxes", \r
-function (state) {\r
-this.displayBoxes = state;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getDisplayBoxes", \r
-function () {\r
-return this.displayBoxes;\r
-});\r
-Clazz.overrideMethod (c$, "getWidth", \r
-function () {\r
-{\r
-var first = true;\r
-for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {\r
-if (first || seq.getLength () > this.width) {\r
-this.width = seq.getLength ();\r
-first = false;\r
-}}\r
-return this.width;\r
-}});\r
-Clazz.defineMethod (c$, "setOutlineColour", \r
-function (c) {\r
-this.outlineColour = c;\r
-}, "java.awt.Color");\r
-Clazz.defineMethod (c$, "getOutlineColour", \r
-function () {\r
-return this.outlineColour;\r
-});\r
-Clazz.defineMethod (c$, "getSequencesInOrder", \r
-function (al) {\r
-return this.getSequencesInOrder (al, true);\r
-}, "jalview.datamodel.AlignmentI");\r
-Clazz.defineMethod (c$, "getSequencesInOrder", \r
-function (al, trim) {\r
-{\r
-var sSize = this.sequences.size ();\r
-var alHeight = al.getHeight ();\r
-var seqs =  new Array ((trim) ? sSize : alHeight);\r
-var index = 0;\r
-for (var i = 0; i < alHeight && index < sSize; i++) {\r
-if (this.sequences.contains (al.getSequenceAt (i))) {\r
-seqs[(trim) ? index : i] = al.getSequenceAt (i);\r
-index++;\r
-}}\r
-if (index == 0) {\r
-return null;\r
-}if (!trim) {\r
-return seqs;\r
-}if (index < seqs.length) {\r
-var dummy = seqs;\r
-seqs =  new Array (index);\r
-while (--index >= 0) {\r
-seqs[index] = dummy[index];\r
-dummy[index] = null;\r
-}\r
-}return seqs;\r
-}}, "jalview.datamodel.AlignmentI,~B");\r
-Clazz.defineMethod (c$, "getIdColour", \r
-function () {\r
-return this.idColour;\r
-});\r
-Clazz.defineMethod (c$, "setIdColour", \r
-function (idColour) {\r
-this.idColour = idColour;\r
-}, "java.awt.Color");\r
-Clazz.overrideMethod (c$, "getSeqrep", \r
-function () {\r
-return this.seqrep;\r
-});\r
-Clazz.overrideMethod (c$, "setSeqrep", \r
-function (seqrep) {\r
-this.seqrep = seqrep;\r
-}, "jalview.datamodel.SequenceI");\r
-Clazz.overrideMethod (c$, "hasSeqrep", \r
-function () {\r
-return this.seqrep != null;\r
-});\r
-Clazz.defineMethod (c$, "setHidereps", \r
-function (visibility) {\r
-this.hidereps = visibility;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isHidereps", \r
-function () {\r
-return this.hidereps;\r
-});\r
-Clazz.defineMethod (c$, "setHideCols", \r
-function (visibility) {\r
-this.hidecols = visibility;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isHideCols", \r
-function () {\r
-return this.hidecols;\r
-});\r
-Clazz.defineMethod (c$, "intersect", \r
-function (alignment, map) {\r
-var sgroup =  new jalview.datamodel.SequenceGroup (this);\r
-var insect = this.getSequencesInOrder (alignment);\r
-sgroup.sequences =  new java.util.ArrayList ();\r
-for (var s = 0; insect != null && s < insect.length; s++) {\r
-if (map == null || map.containsKey (insect[s])) {\r
-sgroup.sequences.add (insect[s]);\r
-}}\r
-return sgroup;\r
-}, "jalview.datamodel.AlignmentI,java.util.Map");\r
-Clazz.defineMethod (c$, "getShowNonconserved", \r
-function () {\r
-return this.showNonconserved;\r
-});\r
-Clazz.defineMethod (c$, "setShowNonconserved", \r
-function (displayNonconserved) {\r
-this.showNonconserved = displayNonconserved;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setConsensus", \r
-function (aan) {\r
-if (this.consensus == null) {\r
-this.consensus = aan;\r
-}}, "jalview.datamodel.AlignmentAnnotation");\r
-Clazz.defineMethod (c$, "getConsensus", \r
-function () {\r
-var aWidth = this.getWidth ();\r
-if (aWidth < 0) {\r
-return null;\r
-}if (this.consensus == null) {\r
-this.consensus =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 100, 1);\r
-this.consensus.hasText = true;\r
-this.consensus.autoCalculated = true;\r
-this.consensus.groupRef = this;\r
-this.consensus.label = "Consensus for " + this.getName ();\r
-this.consensus.description = "Percent Identity";\r
-}return this.consensus;\r
-});\r
-Clazz.defineMethod (c$, "setConservationRow", \r
-function (aan) {\r
-if (this.conservation == null) {\r
-this.conservation = aan;\r
-}}, "jalview.datamodel.AlignmentAnnotation");\r
-Clazz.defineMethod (c$, "getConservationRow", \r
-function () {\r
-if (this.conservation == null) {\r
-this.conservation =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 11, 1);\r
-}this.conservation.hasText = true;\r
-this.conservation.autoCalculated = true;\r
-this.conservation.groupRef = this;\r
-this.conservation.label = "Conservation for " + this.getName ();\r
-this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";\r
-return this.conservation;\r
-});\r
-Clazz.defineMethod (c$, "hasAnnotationRows", \r
-function () {\r
-return this.consensus != null || this.conservation != null;\r
-});\r
-Clazz.defineMethod (c$, "getConsensusSeq", \r
-function () {\r
-this.getConsensus ();\r
-var seqs =  new StringBuffer ();\r
-for (var i = 0; i < this.consensus.annotations.length; i++) {\r
-if (this.consensus.annotations[i] != null) {\r
-if (this.consensus.annotations[i].description.charAt (0) == '[') {\r
-seqs.append (this.consensus.annotations[i].description.charAt (1));\r
-} else {\r
-seqs.append (this.consensus.annotations[i].displayCharacter);\r
-}}}\r
-var sq =  new jalview.datamodel.Sequence ("Group" + this.getName () + " Consensus", seqs.toString ());\r
-sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensus) ? " without gaps" : ""));\r
-return sq;\r
-});\r
-Clazz.defineMethod (c$, "setIgnoreGapsConsensus", \r
-function (state) {\r
-if (this.ignoreGapsInConsensus != state && this.consensus != null) {\r
-this.ignoreGapsInConsensus = state;\r
-this.recalcConservation ();\r
-}this.ignoreGapsInConsensus = state;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "getIgnoreGapsConsensus", \r
-function () {\r
-return this.ignoreGapsInConsensus;\r
-});\r
-Clazz.defineMethod (c$, "setshowSequenceLogo", \r
-function (showSequenceLogo) {\r
-if (this.showSequenceLogo != showSequenceLogo && this.consensus != null) {\r
-this.showSequenceLogo = showSequenceLogo;\r
-this.recalcConservation ();\r
-}this.showSequenceLogo = showSequenceLogo;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "setShowConsensusHistogram", \r
-function (showConsHist) {\r
-if (this.showConsensusHistogram != showConsHist && this.consensus != null) {\r
-this.showConsensusHistogram = showConsHist;\r
-this.recalcConservation ();\r
-}this.showConsensusHistogram = showConsHist;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isShowConsensusHistogram", \r
-function () {\r
-return this.showConsensusHistogram;\r
-});\r
-Clazz.defineMethod (c$, "setNormaliseSequenceLogo", \r
-function (norm) {\r
-this.normaliseSequenceLogo = norm;\r
-}, "~B");\r
-Clazz.defineMethod (c$, "isNormaliseSequenceLogo", \r
-function () {\r
-return this.normaliseSequenceLogo;\r
-});\r
-Clazz.overrideMethod (c$, "getAlignmentAnnotation", \r
-function () {\r
-var annot =  new java.util.ArrayList ();\r
-{\r
-for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {\r
-var aa = seq.getAnnotation ();\r
-if (aa != null) {\r
-for (var al, $al = 0, $$al = aa; $al < $$al.length && ((al = $$al[$al]) || true); $al++) {\r
-if (al.groupRef === this) {\r
-annot.add (al);\r
-}}\r
-}}\r
-if (this.consensus != null) {\r
-annot.add (this.consensus);\r
-}if (this.conservation != null) {\r
-annot.add (this.conservation);\r
-}}return annot.toArray ( new Array (0));\r
-});\r
-Clazz.overrideMethod (c$, "findAnnotation", \r
-function (calcId) {\r
-var aa =  new java.util.ArrayList ();\r
-for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {\r
-if (a.getCalcId () === calcId) {\r
-aa.add (a);\r
-}}\r
-return aa;\r
-}, "~S");\r
-Clazz.overrideMethod (c$, "findAnnotations", \r
-function (seq, calcId, label) {\r
-var aa =  new java.util.ArrayList ();\r
-for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {\r
-if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) {\r
-aa.add (ann);\r
-}}\r
-return aa;\r
-}, "jalview.datamodel.SequenceI,~S,~S");\r
-Clazz.defineMethod (c$, "hasAnnotation", \r
-function (calcId) {\r
-if (calcId != null && !"".equals (calcId)) {\r
-for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {\r
-if (a.getCalcId () === calcId) {\r
-return true;\r
-}}\r
-}return false;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "clear", \r
-function () {\r
-{\r
-this.sequences.clear ();\r
-}});\r
-Clazz.defineMethod (c$, "setContext", \r
-function (context) {\r
-this.context = context;\r
-}, "jalview.datamodel.AnnotatedCollectionI");\r
-Clazz.overrideMethod (c$, "getContext", \r
-function () {\r
-return this.context;\r
-});\r
-});\r
+Clazz.declarePackage ("jalview.datamodel");
+Clazz.load (["jalview.datamodel.AnnotatedCollectionI", "java.awt.Color", "java.util.ArrayList"], "jalview.datamodel.SequenceGroup", ["jalview.analysis.AAFrequency", "$.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.Sequence", "jalview.schemes.ResidueProperties", "jalview.util.Comparison", "java.lang.StringBuffer"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.groupName = null;
+this.description = null;
+this.conserve = null;
+this.aaFrequency = null;
+this.displayBoxes = true;
+this.displayText = true;
+this.colourText = false;
+this.showNonconserved = false;
+this.sequences = null;
+this.seqrep = null;
+this.width = -1;
+this.cs = null;
+this.startRes = 0;
+this.endRes = 0;
+this.outlineColour = null;
+this.idColour = null;
+this.thresholdTextColour = 0;
+this.textColour = null;
+this.textColour2 = null;
+this.ignoreGapsInConsensus = true;
+this.showSequenceLogo = false;
+this.normaliseSequenceLogo = false;
+this.consPercGaps = 25;
+this.consensusData = null;
+this.hidereps = false;
+this.hidecols = false;
+this.consensus = null;
+this.conservation = null;
+this.showConsensusHistogram = false;
+this.context = null;
+Clazz.instantialize (this, arguments);
+}, jalview.datamodel, "SequenceGroup", null, jalview.datamodel.AnnotatedCollectionI);
+Clazz.prepareFields (c$, function () {
+this.sequences =  new java.util.ArrayList ();
+this.outlineColour = java.awt.Color.black;
+this.textColour = java.awt.Color.black;
+this.textColour2 = java.awt.Color.white;
+});
+Clazz.defineMethod (c$, "isShowSequenceLogo", 
+function () {
+return this.showSequenceLogo;
+});
+Clazz.makeConstructor (c$, 
+function () {
+this.groupName = "JGroup:" + this.hashCode ();
+});
+Clazz.makeConstructor (c$, 
+function (sequences, groupName, scheme, displayBoxes, displayText, colourText, start, end) {
+this.sequences = sequences;
+this.groupName = groupName;
+this.displayBoxes = displayBoxes;
+this.displayText = displayText;
+this.colourText = colourText;
+this.cs = scheme;
+this.startRes = start;
+this.endRes = end;
+this.recalcConservation ();
+}, "java.util.List,~S,jalview.schemes.ColourSchemeI,~B,~B,~B,~N,~N");
+Clazz.makeConstructor (c$, 
+function (seqsel) {
+if (seqsel != null) {
+this.sequences =  new java.util.ArrayList ();
+this.sequences.addAll (seqsel.sequences);
+if (seqsel.groupName != null) {
+this.groupName =  String.instantialize (seqsel.groupName);
+}this.displayBoxes = seqsel.displayBoxes;
+this.displayText = seqsel.displayText;
+this.colourText = seqsel.colourText;
+this.startRes = seqsel.startRes;
+this.endRes = seqsel.endRes;
+this.cs = seqsel.cs;
+if (seqsel.description != null) {
+this.description =  String.instantialize (seqsel.description);
+}this.hidecols = seqsel.hidecols;
+this.hidereps = seqsel.hidereps;
+this.idColour = seqsel.idColour;
+this.outlineColour = seqsel.outlineColour;
+this.seqrep = seqsel.seqrep;
+this.textColour = seqsel.textColour;
+this.textColour2 = seqsel.textColour2;
+this.thresholdTextColour = seqsel.thresholdTextColour;
+this.width = seqsel.width;
+this.ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus;
+if (seqsel.conserve != null) {
+this.recalcConservation ();
+}}}, "jalview.datamodel.SequenceGroup");
+Clazz.defineMethod (c$, "getSelectionAsNewSequences", 
+function (align) {
+var iSize = this.sequences.size ();
+var seqs =  new Array (iSize);
+var inorder = this.getSequencesInOrder (align);
+for (var i = 0, ipos = 0; i < inorder.length; i++) {
+var seq = inorder[i];
+seqs[ipos] = seq.getSubSequence (this.startRes, this.endRes + 1);
+if (seqs[ipos] != null) {
+seqs[ipos].setDescription (seq.getDescription ());
+seqs[ipos].setDBRef (seq.getDBRef ());
+seqs[ipos].setSequenceFeatures (seq.getSequenceFeatures ());
+if (seq.getDatasetSequence () != null) {
+seqs[ipos].setDatasetSequence (seq.getDatasetSequence ());
+}if (seq.getAnnotation () != null) {
+var alann = align.getAlignmentAnnotation ();
+for (var a = 0; a < seq.getAnnotation ().length; a++) {
+var tocopy = seq.getAnnotation ()[a];
+if (alann != null) {
+var found = false;
+for (var pos = 0; pos < alann.length; pos++) {
+if (alann[pos] === tocopy) {
+found = true;
+break;
+}}
+if (!found) {
+continue;
+}}var newannot =  new jalview.datamodel.AlignmentAnnotation (seq.getAnnotation ()[a]);
+newannot.restrict (this.startRes, this.endRes);
+newannot.setSequenceRef (seqs[ipos]);
+newannot.adjustForAlignment ();
+seqs[ipos].addAlignmentAnnotation (newannot);
+}
+}ipos++;
+} else {
+iSize--;
+}}
+if (iSize != inorder.length) {
+var nseqs =  new Array (iSize);
+System.arraycopy (seqs, 0, nseqs, 0, iSize);
+seqs = nseqs;
+}return seqs;
+}, "jalview.datamodel.AlignmentI");
+Clazz.defineMethod (c$, "findEndRes", 
+function (seq) {
+var eres = 0;
+var ch;
+for (var j = 0; j < this.endRes + 1 && j < seq.getLength (); j++) {
+ch = seq.getCharAt (j);
+if (!jalview.util.Comparison.isGap ((ch))) {
+eres++;
+}}
+if (eres > 0) {
+eres += seq.getStart () - 1;
+}return eres;
+}, "jalview.datamodel.SequenceI");
+Clazz.defineMethod (c$, "getSequences", 
+function () {
+return this.sequences;
+});
+Clazz.defineMethod (c$, "getSequences", 
+function (hiddenReps) {
+if (hiddenReps == null) {
+return this.sequences;
+} else {
+var allSequences =  new java.util.ArrayList ();
+for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
+allSequences.add (seq);
+if (hiddenReps.containsKey (seq)) {
+var hsg = hiddenReps.get (seq);
+for (var seq2, $seq2 = hsg.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) {
+if (seq2 !== seq && !allSequences.contains (seq2)) {
+allSequences.add (seq2);
+}}
+}}
+return allSequences;
+}}, "java.util.Map");
+Clazz.defineMethod (c$, "getSequencesAsArray", 
+function (map) {
+var tmp = this.getSequences (map);
+if (tmp == null) {
+return null;
+}return tmp.toArray ( new Array (tmp.size ()));
+}, "java.util.Map");
+Clazz.defineMethod (c$, "adjustForRemoveLeft", 
+function (col) {
+if (this.startRes >= col) {
+this.startRes = this.startRes - col;
+}if (this.endRes >= col) {
+this.endRes = this.endRes - col;
+if (this.startRes > this.endRes) {
+this.startRes = 0;
+}} else {
+return false;
+}return true;
+}, "~N");
+Clazz.defineMethod (c$, "adjustForRemoveRight", 
+function (col) {
+if (this.startRes > col) {
+return false;
+}if (this.endRes >= col) {
+this.endRes = col;
+}return true;
+}, "~N");
+Clazz.defineMethod (c$, "getName", 
+function () {
+return this.groupName;
+});
+Clazz.defineMethod (c$, "getDescription", 
+function () {
+return this.description;
+});
+Clazz.defineMethod (c$, "setName", 
+function (name) {
+this.groupName = name;
+}, "~S");
+Clazz.defineMethod (c$, "setDescription", 
+function (desc) {
+this.description = desc;
+}, "~S");
+Clazz.defineMethod (c$, "getConservation", 
+function () {
+return this.conserve;
+});
+Clazz.defineMethod (c$, "setConservation", 
+function (c) {
+this.conserve = c;
+}, "jalview.analysis.Conservation");
+Clazz.defineMethod (c$, "addSequence", 
+function (s, recalc) {
+{
+if (s != null && !this.sequences.contains (s)) {
+this.sequences.add (s);
+}if (recalc) {
+this.recalcConservation ();
+}}}, "jalview.datamodel.SequenceI,~B");
+Clazz.defineMethod (c$, "getConsPercGaps", 
+function () {
+return this.consPercGaps;
+});
+Clazz.defineMethod (c$, "setConsPercGaps", 
+function (consPercGaps) {
+this.consPercGaps = consPercGaps;
+}, "~N");
+Clazz.defineMethod (c$, "recalcConservation", 
+function () {
+if (this.cs == null && this.consensus == null && this.conservation == null) {
+return;
+}try {
+var cnsns = jalview.analysis.AAFrequency.calculate (this.sequences, this.startRes, this.endRes + 1, this.showSequenceLogo);
+if (this.consensus != null) {
+this._updateConsensusRow (cnsns, this.sequences.size ());
+}if (this.cs != null) {
+this.cs.setConsensus (cnsns);
+}if ((this.conservation != null) || (this.cs != null && this.cs.conservationApplied ())) {
+var c =  new jalview.analysis.Conservation (this.groupName, jalview.schemes.ResidueProperties.propHash, 3, this.sequences, this.startRes, this.endRes + 1);
+c.calculate ();
+c.verdict (false, this.consPercGaps);
+if (this.conservation != null) {
+this._updateConservationRow (c);
+}if (this.cs != null) {
+if (this.cs.conservationApplied ()) {
+this.cs.setConservation (c);
+}}}if (this.cs != null) {
+this.cs.alignmentChanged (this.context != null ? this.context : this, null);
+}} catch (err) {
+if (Clazz.exceptionOf (err, OutOfMemoryError)) {
+System.out.println ("Out of memory loading groups: " + err);
+} else {
+throw err;
+}
+}
+});
+Clazz.defineMethod (c$, "_updateConservationRow", 
+($fz = function (c) {
+if (this.conservation == null) {
+this.getConservation ();
+}this.conservation.label = "Conservation for " + this.getName ();
+this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";
+var aWidth = (this.conservation.annotations != null) ? (this.endRes < this.conservation.annotations.length ? this.conservation.annotations.length : this.endRes + 1) : this.endRes + 1;
+this.conservation.annotations = null;
+this.conservation.annotations =  new Array (aWidth);
+c.completeAnnotations (this.conservation, null, this.startRes, this.endRes + 1);
+}, $fz.isPrivate = true, $fz), "jalview.analysis.Conservation");
+Clazz.defineMethod (c$, "_updateConsensusRow", 
+($fz = function (cnsns, nseq) {
+if (this.consensus == null) {
+this.getConsensus ();
+}this.consensus.label = "Consensus for " + this.getName ();
+this.consensus.description = "Percent Identity";
+this.consensusData = cnsns;
+var aWidth = (this.consensus.annotations != null) ? (this.endRes < this.consensus.annotations.length ? this.consensus.annotations.length : this.endRes + 1) : this.endRes + 1;
+this.consensus.annotations = null;
+this.consensus.annotations =  new Array (aWidth);
+jalview.analysis.AAFrequency.completeConsensus (this.consensus, cnsns, this.startRes, this.endRes + 1, this.ignoreGapsInConsensus, this.showSequenceLogo, nseq);
+}, $fz.isPrivate = true, $fz), "~A,~N");
+Clazz.defineMethod (c$, "addOrRemove", 
+function (s, recalc) {
+{
+if (this.sequences.contains (s)) {
+this.deleteSequence (s, recalc);
+} else {
+this.addSequence (s, recalc);
+}}}, "jalview.datamodel.SequenceI,~B");
+Clazz.defineMethod (c$, "deleteSequence", 
+function (s, recalc) {
+{
+this.sequences.remove (s);
+if (recalc) {
+this.recalcConservation ();
+}}}, "jalview.datamodel.SequenceI,~B");
+Clazz.overrideMethod (c$, "getStartRes", 
+function () {
+return this.startRes;
+});
+Clazz.overrideMethod (c$, "getEndRes", 
+function () {
+return this.endRes;
+});
+Clazz.defineMethod (c$, "setStartRes", 
+function (i) {
+this.startRes = i;
+}, "~N");
+Clazz.defineMethod (c$, "setEndRes", 
+function (i) {
+this.endRes = i;
+}, "~N");
+Clazz.defineMethod (c$, "getSize", 
+function () {
+return this.sequences.size ();
+});
+Clazz.defineMethod (c$, "getSequenceAt", 
+function (i) {
+return this.sequences.get (i);
+}, "~N");
+Clazz.defineMethod (c$, "setColourText", 
+function (state) {
+this.colourText = state;
+}, "~B");
+Clazz.defineMethod (c$, "getColourText", 
+function () {
+return this.colourText;
+});
+Clazz.defineMethod (c$, "setDisplayText", 
+function (state) {
+this.displayText = state;
+}, "~B");
+Clazz.defineMethod (c$, "getDisplayText", 
+function () {
+return this.displayText;
+});
+Clazz.defineMethod (c$, "setDisplayBoxes", 
+function (state) {
+this.displayBoxes = state;
+}, "~B");
+Clazz.defineMethod (c$, "getDisplayBoxes", 
+function () {
+return this.displayBoxes;
+});
+Clazz.overrideMethod (c$, "getWidth", 
+function () {
+{
+var first = true;
+for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
+if (first || seq.getLength () > this.width) {
+this.width = seq.getLength ();
+first = false;
+}}
+return this.width;
+}});
+Clazz.defineMethod (c$, "setOutlineColour", 
+function (c) {
+this.outlineColour = c;
+}, "java.awt.Color");
+Clazz.defineMethod (c$, "getOutlineColour", 
+function () {
+return this.outlineColour;
+});
+Clazz.defineMethod (c$, "getSequencesInOrder", 
+function (al) {
+return this.getSequencesInOrder (al, true);
+}, "jalview.datamodel.AlignmentI");
+Clazz.defineMethod (c$, "getSequencesInOrder", 
+function (al, trim) {
+{
+var sSize = this.sequences.size ();
+var alHeight = al.getHeight ();
+var seqs =  new Array ((trim) ? sSize : alHeight);
+var index = 0;
+for (var i = 0; i < alHeight && index < sSize; i++) {
+if (this.sequences.contains (al.getSequenceAt (i))) {
+seqs[(trim) ? index : i] = al.getSequenceAt (i);
+index++;
+}}
+if (index == 0) {
+return null;
+}if (!trim) {
+return seqs;
+}if (index < seqs.length) {
+var dummy = seqs;
+seqs =  new Array (index);
+while (--index >= 0) {
+seqs[index] = dummy[index];
+dummy[index] = null;
+}
+}return seqs;
+}}, "jalview.datamodel.AlignmentI,~B");
+Clazz.defineMethod (c$, "getIdColour", 
+function () {
+return this.idColour;
+});
+Clazz.defineMethod (c$, "setIdColour", 
+function (idColour) {
+this.idColour = idColour;
+}, "java.awt.Color");
+Clazz.overrideMethod (c$, "getSeqrep", 
+function () {
+return this.seqrep;
+});
+Clazz.overrideMethod (c$, "setSeqrep", 
+function (seqrep) {
+this.seqrep = seqrep;
+}, "jalview.datamodel.SequenceI");
+Clazz.overrideMethod (c$, "hasSeqrep", 
+function () {
+return this.seqrep != null;
+});
+Clazz.defineMethod (c$, "setHidereps", 
+function (visibility) {
+this.hidereps = visibility;
+}, "~B");
+Clazz.defineMethod (c$, "isHidereps", 
+function () {
+return this.hidereps;
+});
+Clazz.defineMethod (c$, "setHideCols", 
+function (visibility) {
+this.hidecols = visibility;
+}, "~B");
+Clazz.defineMethod (c$, "isHideCols", 
+function () {
+return this.hidecols;
+});
+Clazz.defineMethod (c$, "intersect", 
+function (alignment, map) {
+var sgroup =  new jalview.datamodel.SequenceGroup (this);
+var insect = this.getSequencesInOrder (alignment);
+sgroup.sequences =  new java.util.ArrayList ();
+for (var s = 0; insect != null && s < insect.length; s++) {
+if (map == null || map.containsKey (insect[s])) {
+sgroup.sequences.add (insect[s]);
+}}
+return sgroup;
+}, "jalview.datamodel.AlignmentI,java.util.Map");
+Clazz.defineMethod (c$, "getShowNonconserved", 
+function () {
+return this.showNonconserved;
+});
+Clazz.defineMethod (c$, "setShowNonconserved", 
+function (displayNonconserved) {
+this.showNonconserved = displayNonconserved;
+}, "~B");
+Clazz.defineMethod (c$, "setConsensus", 
+function (aan) {
+if (this.consensus == null) {
+this.consensus = aan;
+}}, "jalview.datamodel.AlignmentAnnotation");
+Clazz.defineMethod (c$, "getConsensus", 
+function () {
+var aWidth = this.getWidth ();
+if (aWidth < 0) {
+return null;
+}if (this.consensus == null) {
+this.consensus =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 100, 1);
+this.consensus.hasText = true;
+this.consensus.autoCalculated = true;
+this.consensus.groupRef = this;
+this.consensus.label = "Consensus for " + this.getName ();
+this.consensus.description = "Percent Identity";
+}return this.consensus;
+});
+Clazz.defineMethod (c$, "setConservationRow", 
+function (aan) {
+if (this.conservation == null) {
+this.conservation = aan;
+}}, "jalview.datamodel.AlignmentAnnotation");
+Clazz.defineMethod (c$, "getConservationRow", 
+function () {
+if (this.conservation == null) {
+this.conservation =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 11, 1);
+}this.conservation.hasText = true;
+this.conservation.autoCalculated = true;
+this.conservation.groupRef = this;
+this.conservation.label = "Conservation for " + this.getName ();
+this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";
+return this.conservation;
+});
+Clazz.defineMethod (c$, "hasAnnotationRows", 
+function () {
+return this.consensus != null || this.conservation != null;
+});
+Clazz.defineMethod (c$, "getConsensusSeq", 
+function () {
+this.getConsensus ();
+var seqs =  new StringBuffer ();
+for (var i = 0; i < this.consensus.annotations.length; i++) {
+if (this.consensus.annotations[i] != null) {
+if (this.consensus.annotations[i].description.charAt (0) == '[') {
+seqs.append (this.consensus.annotations[i].description.charAt (1));
+} else {
+seqs.append (this.consensus.annotations[i].displayCharacter);
+}}}
+var sq =  new jalview.datamodel.Sequence ("Group" + this.getName () + " Consensus", seqs.toString ());
+sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensus) ? " without gaps" : ""));
+return sq;
+});
+Clazz.defineMethod (c$, "setIgnoreGapsConsensus", 
+function (state) {
+if (this.ignoreGapsInConsensus != state && this.consensus != null) {
+this.ignoreGapsInConsensus = state;
+this.recalcConservation ();
+}this.ignoreGapsInConsensus = state;
+}, "~B");
+Clazz.defineMethod (c$, "getIgnoreGapsConsensus", 
+function () {
+return this.ignoreGapsInConsensus;
+});
+Clazz.defineMethod (c$, "setshowSequenceLogo", 
+function (showSequenceLogo) {
+if (this.showSequenceLogo != showSequenceLogo && this.consensus != null) {
+this.showSequenceLogo = showSequenceLogo;
+this.recalcConservation ();
+}this.showSequenceLogo = showSequenceLogo;
+}, "~B");
+Clazz.defineMethod (c$, "setShowConsensusHistogram", 
+function (showConsHist) {
+if (this.showConsensusHistogram != showConsHist && this.consensus != null) {
+this.showConsensusHistogram = showConsHist;
+this.recalcConservation ();
+}this.showConsensusHistogram = showConsHist;
+}, "~B");
+Clazz.defineMethod (c$, "isShowConsensusHistogram", 
+function () {
+return this.showConsensusHistogram;
+});
+Clazz.defineMethod (c$, "setNormaliseSequenceLogo", 
+function (norm) {
+this.normaliseSequenceLogo = norm;
+}, "~B");
+Clazz.defineMethod (c$, "isNormaliseSequenceLogo", 
+function () {
+return this.normaliseSequenceLogo;
+});
+Clazz.overrideMethod (c$, "getAlignmentAnnotation", 
+function () {
+var annot =  new java.util.ArrayList ();
+{
+for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
+var aa = seq.getAnnotation ();
+if (aa != null) {
+for (var al, $al = 0, $$al = aa; $al < $$al.length && ((al = $$al[$al]) || true); $al++) {
+if (al.groupRef === this) {
+annot.add (al);
+}}
+}}
+if (this.consensus != null) {
+annot.add (this.consensus);
+}if (this.conservation != null) {
+annot.add (this.conservation);
+}}return annot.toArray ( new Array (0));
+});
+Clazz.overrideMethod (c$, "findAnnotation", 
+function (calcId) {
+var aa =  new java.util.ArrayList ();
+for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {
+if (a.getCalcId () === calcId) {
+aa.add (a);
+}}
+return aa;
+}, "~S");
+Clazz.overrideMethod (c$, "findAnnotations", 
+function (seq, calcId, label) {
+var aa =  new java.util.ArrayList ();
+for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {
+if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) {
+aa.add (ann);
+}}
+return aa;
+}, "jalview.datamodel.SequenceI,~S,~S");
+Clazz.defineMethod (c$, "hasAnnotation", 
+function (calcId) {
+if (calcId != null && !"".equals (calcId)) {
+for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {
+if (a.getCalcId () === calcId) {
+return true;
+}}
+}return false;
+}, "~S");
+Clazz.defineMethod (c$, "clear", 
+function () {
+{
+this.sequences.clear ();
+}});
+Clazz.defineMethod (c$, "setContext", 
+function (context) {
+this.context = context;
+}, "jalview.datamodel.AnnotatedCollectionI");
+Clazz.overrideMethod (c$, "getContext", 
+function () {
+return this.context;
+});
+});