Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / jalview / datamodel / SequenceGroup.js
1 Clazz.declarePackage ("jalview.datamodel");
2 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 () {
3 c$ = Clazz.decorateAsClass (function () {
4 this.groupName = null;
5 this.description = null;
6 this.conserve = null;
7 this.aaFrequency = null;
8 this.displayBoxes = true;
9 this.displayText = true;
10 this.colourText = false;
11 this.showNonconserved = false;
12 this.sequences = null;
13 this.seqrep = null;
14 this.width = -1;
15 this.cs = null;
16 this.startRes = 0;
17 this.endRes = 0;
18 this.outlineColour = null;
19 this.idColour = null;
20 this.thresholdTextColour = 0;
21 this.textColour = null;
22 this.textColour2 = null;
23 this.ignoreGapsInConsensus = true;
24 this.showSequenceLogo = false;
25 this.normaliseSequenceLogo = false;
26 this.consPercGaps = 25;
27 this.consensusData = null;
28 this.hidereps = false;
29 this.hidecols = false;
30 this.consensus = null;
31 this.conservation = null;
32 this.showConsensusHistogram = false;
33 this.context = null;
34 Clazz.instantialize (this, arguments);
35 }, jalview.datamodel, "SequenceGroup", null, jalview.datamodel.AnnotatedCollectionI);
36 Clazz.prepareFields (c$, function () {
37 this.sequences =  new java.util.ArrayList ();
38 this.outlineColour = java.awt.Color.black;
39 this.textColour = java.awt.Color.black;
40 this.textColour2 = java.awt.Color.white;
41 });
42 Clazz.defineMethod (c$, "isShowSequenceLogo", 
43 function () {
44 return this.showSequenceLogo;
45 });
46 Clazz.makeConstructor (c$, 
47 function () {
48 this.groupName = "JGroup:" + this.hashCode ();
49 });
50 Clazz.makeConstructor (c$, 
51 function (sequences, groupName, scheme, displayBoxes, displayText, colourText, start, end) {
52 this.sequences = sequences;
53 this.groupName = groupName;
54 this.displayBoxes = displayBoxes;
55 this.displayText = displayText;
56 this.colourText = colourText;
57 this.cs = scheme;
58 this.startRes = start;
59 this.endRes = end;
60 this.recalcConservation ();
61 }, "java.util.List,~S,jalview.schemes.ColourSchemeI,~B,~B,~B,~N,~N");
62 Clazz.makeConstructor (c$, 
63 function (seqsel) {
64 if (seqsel != null) {
65 this.sequences =  new java.util.ArrayList ();
66 this.sequences.addAll (seqsel.sequences);
67 if (seqsel.groupName != null) {
68 this.groupName =  String.instantialize (seqsel.groupName);
69 }this.displayBoxes = seqsel.displayBoxes;
70 this.displayText = seqsel.displayText;
71 this.colourText = seqsel.colourText;
72 this.startRes = seqsel.startRes;
73 this.endRes = seqsel.endRes;
74 this.cs = seqsel.cs;
75 if (seqsel.description != null) {
76 this.description =  String.instantialize (seqsel.description);
77 }this.hidecols = seqsel.hidecols;
78 this.hidereps = seqsel.hidereps;
79 this.idColour = seqsel.idColour;
80 this.outlineColour = seqsel.outlineColour;
81 this.seqrep = seqsel.seqrep;
82 this.textColour = seqsel.textColour;
83 this.textColour2 = seqsel.textColour2;
84 this.thresholdTextColour = seqsel.thresholdTextColour;
85 this.width = seqsel.width;
86 this.ignoreGapsInConsensus = seqsel.ignoreGapsInConsensus;
87 if (seqsel.conserve != null) {
88 this.recalcConservation ();
89 }}}, "jalview.datamodel.SequenceGroup");
90 Clazz.defineMethod (c$, "getSelectionAsNewSequences", 
91 function (align) {
92 var iSize = this.sequences.size ();
93 var seqs =  new Array (iSize);
94 var inorder = this.getSequencesInOrder (align);
95 for (var i = 0, ipos = 0; i < inorder.length; i++) {
96 var seq = inorder[i];
97 seqs[ipos] = seq.getSubSequence (this.startRes, this.endRes + 1);
98 if (seqs[ipos] != null) {
99 seqs[ipos].setDescription (seq.getDescription ());
100 seqs[ipos].setDBRef (seq.getDBRef ());
101 seqs[ipos].setSequenceFeatures (seq.getSequenceFeatures ());
102 if (seq.getDatasetSequence () != null) {
103 seqs[ipos].setDatasetSequence (seq.getDatasetSequence ());
104 }if (seq.getAnnotation () != null) {
105 var alann = align.getAlignmentAnnotation ();
106 for (var a = 0; a < seq.getAnnotation ().length; a++) {
107 var tocopy = seq.getAnnotation ()[a];
108 if (alann != null) {
109 var found = false;
110 for (var pos = 0; pos < alann.length; pos++) {
111 if (alann[pos] === tocopy) {
112 found = true;
113 break;
114 }}
115 if (!found) {
116 continue;
117 }}var newannot =  new jalview.datamodel.AlignmentAnnotation (seq.getAnnotation ()[a]);
118 newannot.restrict (this.startRes, this.endRes);
119 newannot.setSequenceRef (seqs[ipos]);
120 newannot.adjustForAlignment ();
121 seqs[ipos].addAlignmentAnnotation (newannot);
122 }
123 }ipos++;
124 } else {
125 iSize--;
126 }}
127 if (iSize != inorder.length) {
128 var nseqs =  new Array (iSize);
129 System.arraycopy (seqs, 0, nseqs, 0, iSize);
130 seqs = nseqs;
131 }return seqs;
132 }, "jalview.datamodel.AlignmentI");
133 Clazz.defineMethod (c$, "findEndRes", 
134 function (seq) {
135 var eres = 0;
136 var ch;
137 for (var j = 0; j < this.endRes + 1 && j < seq.getLength (); j++) {
138 ch = seq.getCharAt (j);
139 if (!jalview.util.Comparison.isGap ((ch))) {
140 eres++;
141 }}
142 if (eres > 0) {
143 eres += seq.getStart () - 1;
144 }return eres;
145 }, "jalview.datamodel.SequenceI");
146 Clazz.defineMethod (c$, "getSequences", 
147 function () {
148 return this.sequences;
149 });
150 Clazz.defineMethod (c$, "getSequences", 
151 function (hiddenReps) {
152 if (hiddenReps == null) {
153 return this.sequences;
154 } else {
155 var allSequences =  new java.util.ArrayList ();
156 for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
157 allSequences.add (seq);
158 if (hiddenReps.containsKey (seq)) {
159 var hsg = hiddenReps.get (seq);
160 for (var seq2, $seq2 = hsg.getSequences ().iterator (); $seq2.hasNext () && ((seq2 = $seq2.next ()) || true);) {
161 if (seq2 !== seq && !allSequences.contains (seq2)) {
162 allSequences.add (seq2);
163 }}
164 }}
165 return allSequences;
166 }}, "java.util.Map");
167 Clazz.defineMethod (c$, "getSequencesAsArray", 
168 function (map) {
169 var tmp = this.getSequences (map);
170 if (tmp == null) {
171 return null;
172 }return tmp.toArray ( new Array (tmp.size ()));
173 }, "java.util.Map");
174 Clazz.defineMethod (c$, "adjustForRemoveLeft", 
175 function (col) {
176 if (this.startRes >= col) {
177 this.startRes = this.startRes - col;
178 }if (this.endRes >= col) {
179 this.endRes = this.endRes - col;
180 if (this.startRes > this.endRes) {
181 this.startRes = 0;
182 }} else {
183 return false;
184 }return true;
185 }, "~N");
186 Clazz.defineMethod (c$, "adjustForRemoveRight", 
187 function (col) {
188 if (this.startRes > col) {
189 return false;
190 }if (this.endRes >= col) {
191 this.endRes = col;
192 }return true;
193 }, "~N");
194 Clazz.defineMethod (c$, "getName", 
195 function () {
196 return this.groupName;
197 });
198 Clazz.defineMethod (c$, "getDescription", 
199 function () {
200 return this.description;
201 });
202 Clazz.defineMethod (c$, "setName", 
203 function (name) {
204 this.groupName = name;
205 }, "~S");
206 Clazz.defineMethod (c$, "setDescription", 
207 function (desc) {
208 this.description = desc;
209 }, "~S");
210 Clazz.defineMethod (c$, "getConservation", 
211 function () {
212 return this.conserve;
213 });
214 Clazz.defineMethod (c$, "setConservation", 
215 function (c) {
216 this.conserve = c;
217 }, "jalview.analysis.Conservation");
218 Clazz.defineMethod (c$, "addSequence", 
219 function (s, recalc) {
220 {
221 if (s != null && !this.sequences.contains (s)) {
222 this.sequences.add (s);
223 }if (recalc) {
224 this.recalcConservation ();
225 }}}, "jalview.datamodel.SequenceI,~B");
226 Clazz.defineMethod (c$, "getConsPercGaps", 
227 function () {
228 return this.consPercGaps;
229 });
230 Clazz.defineMethod (c$, "setConsPercGaps", 
231 function (consPercGaps) {
232 this.consPercGaps = consPercGaps;
233 }, "~N");
234 Clazz.defineMethod (c$, "recalcConservation", 
235 function () {
236 if (this.cs == null && this.consensus == null && this.conservation == null) {
237 return;
238 }try {
239 var cnsns = jalview.analysis.AAFrequency.calculate (this.sequences, this.startRes, this.endRes + 1, this.showSequenceLogo);
240 if (this.consensus != null) {
241 this._updateConsensusRow (cnsns, this.sequences.size ());
242 }if (this.cs != null) {
243 this.cs.setConsensus (cnsns);
244 }if ((this.conservation != null) || (this.cs != null && this.cs.conservationApplied ())) {
245 var c =  new jalview.analysis.Conservation (this.groupName, jalview.schemes.ResidueProperties.propHash, 3, this.sequences, this.startRes, this.endRes + 1);
246 c.calculate ();
247 c.verdict (false, this.consPercGaps);
248 if (this.conservation != null) {
249 this._updateConservationRow (c);
250 }if (this.cs != null) {
251 if (this.cs.conservationApplied ()) {
252 this.cs.setConservation (c);
253 }}}if (this.cs != null) {
254 this.cs.alignmentChanged (this.context != null ? this.context : this, null);
255 }} catch (err) {
256 if (Clazz.exceptionOf (err, OutOfMemoryError)) {
257 System.out.println ("Out of memory loading groups: " + err);
258 } else {
259 throw err;
260 }
261 }
262 });
263 Clazz.defineMethod (c$, "_updateConservationRow", 
264  function (c) {
265 if (this.conservation == null) {
266 this.getConservation ();
267 }this.conservation.label = "Conservation for " + this.getName ();
268 this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";
269 var aWidth = (this.conservation.annotations != null) ? (this.endRes < this.conservation.annotations.length ? this.conservation.annotations.length : this.endRes + 1) : this.endRes + 1;
270 this.conservation.annotations = null;
271 this.conservation.annotations =  new Array (aWidth);
272 c.completeAnnotations (this.conservation, null, this.startRes, this.endRes + 1);
273 }, "jalview.analysis.Conservation");
274 Clazz.defineMethod (c$, "_updateConsensusRow", 
275  function (cnsns, nseq) {
276 if (this.consensus == null) {
277 this.getConsensus ();
278 }this.consensus.label = "Consensus for " + this.getName ();
279 this.consensus.description = "Percent Identity";
280 this.consensusData = cnsns;
281 var aWidth = (this.consensus.annotations != null) ? (this.endRes < this.consensus.annotations.length ? this.consensus.annotations.length : this.endRes + 1) : this.endRes + 1;
282 this.consensus.annotations = null;
283 this.consensus.annotations =  new Array (aWidth);
284 jalview.analysis.AAFrequency.completeConsensus (this.consensus, cnsns, this.startRes, this.endRes + 1, this.ignoreGapsInConsensus, this.showSequenceLogo, nseq);
285 }, "~A,~N");
286 Clazz.defineMethod (c$, "addOrRemove", 
287 function (s, recalc) {
288 {
289 if (this.sequences.contains (s)) {
290 this.deleteSequence (s, recalc);
291 } else {
292 this.addSequence (s, recalc);
293 }}}, "jalview.datamodel.SequenceI,~B");
294 Clazz.defineMethod (c$, "deleteSequence", 
295 function (s, recalc) {
296 {
297 this.sequences.remove (s);
298 if (recalc) {
299 this.recalcConservation ();
300 }}}, "jalview.datamodel.SequenceI,~B");
301 Clazz.overrideMethod (c$, "getStartRes", 
302 function () {
303 return this.startRes;
304 });
305 Clazz.overrideMethod (c$, "getEndRes", 
306 function () {
307 return this.endRes;
308 });
309 Clazz.defineMethod (c$, "setStartRes", 
310 function (i) {
311 this.startRes = i;
312 }, "~N");
313 Clazz.defineMethod (c$, "setEndRes", 
314 function (i) {
315 this.endRes = i;
316 }, "~N");
317 Clazz.defineMethod (c$, "getSize", 
318 function () {
319 return this.sequences.size ();
320 });
321 Clazz.defineMethod (c$, "getSequenceAt", 
322 function (i) {
323 return this.sequences.get (i);
324 }, "~N");
325 Clazz.defineMethod (c$, "setColourText", 
326 function (state) {
327 this.colourText = state;
328 }, "~B");
329 Clazz.defineMethod (c$, "getColourText", 
330 function () {
331 return this.colourText;
332 });
333 Clazz.defineMethod (c$, "setDisplayText", 
334 function (state) {
335 this.displayText = state;
336 }, "~B");
337 Clazz.defineMethod (c$, "getDisplayText", 
338 function () {
339 return this.displayText;
340 });
341 Clazz.defineMethod (c$, "setDisplayBoxes", 
342 function (state) {
343 this.displayBoxes = state;
344 }, "~B");
345 Clazz.defineMethod (c$, "getDisplayBoxes", 
346 function () {
347 return this.displayBoxes;
348 });
349 Clazz.overrideMethod (c$, "getWidth", 
350 function () {
351 {
352 var first = true;
353 for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
354 if (first || seq.getLength () > this.width) {
355 this.width = seq.getLength ();
356 first = false;
357 }}
358 return this.width;
359 }});
360 Clazz.defineMethod (c$, "setOutlineColour", 
361 function (c) {
362 this.outlineColour = c;
363 }, "java.awt.Color");
364 Clazz.defineMethod (c$, "getOutlineColour", 
365 function () {
366 return this.outlineColour;
367 });
368 Clazz.defineMethod (c$, "getSequencesInOrder", 
369 function (al) {
370 return this.getSequencesInOrder (al, true);
371 }, "jalview.datamodel.AlignmentI");
372 Clazz.defineMethod (c$, "getSequencesInOrder", 
373 function (al, trim) {
374 {
375 var sSize = this.sequences.size ();
376 var alHeight = al.getHeight ();
377 var seqs =  new Array ((trim) ? sSize : alHeight);
378 var index = 0;
379 for (var i = 0; i < alHeight && index < sSize; i++) {
380 if (this.sequences.contains (al.getSequenceAt (i))) {
381 seqs[(trim) ? index : i] = al.getSequenceAt (i);
382 index++;
383 }}
384 if (index == 0) {
385 return null;
386 }if (!trim) {
387 return seqs;
388 }if (index < seqs.length) {
389 var dummy = seqs;
390 seqs =  new Array (index);
391 while (--index >= 0) {
392 seqs[index] = dummy[index];
393 dummy[index] = null;
394 }
395 }return seqs;
396 }}, "jalview.datamodel.AlignmentI,~B");
397 Clazz.defineMethod (c$, "getIdColour", 
398 function () {
399 return this.idColour;
400 });
401 Clazz.defineMethod (c$, "setIdColour", 
402 function (idColour) {
403 this.idColour = idColour;
404 }, "java.awt.Color");
405 Clazz.overrideMethod (c$, "getSeqrep", 
406 function () {
407 return this.seqrep;
408 });
409 Clazz.overrideMethod (c$, "setSeqrep", 
410 function (seqrep) {
411 this.seqrep = seqrep;
412 }, "jalview.datamodel.SequenceI");
413 Clazz.overrideMethod (c$, "hasSeqrep", 
414 function () {
415 return this.seqrep != null;
416 });
417 Clazz.defineMethod (c$, "setHidereps", 
418 function (visibility) {
419 this.hidereps = visibility;
420 }, "~B");
421 Clazz.defineMethod (c$, "isHidereps", 
422 function () {
423 return this.hidereps;
424 });
425 Clazz.defineMethod (c$, "setHideCols", 
426 function (visibility) {
427 this.hidecols = visibility;
428 }, "~B");
429 Clazz.defineMethod (c$, "isHideCols", 
430 function () {
431 return this.hidecols;
432 });
433 Clazz.defineMethod (c$, "intersect", 
434 function (alignment, map) {
435 var sgroup =  new jalview.datamodel.SequenceGroup (this);
436 var insect = this.getSequencesInOrder (alignment);
437 sgroup.sequences =  new java.util.ArrayList ();
438 for (var s = 0; insect != null && s < insect.length; s++) {
439 if (map == null || map.containsKey (insect[s])) {
440 sgroup.sequences.add (insect[s]);
441 }}
442 return sgroup;
443 }, "jalview.datamodel.AlignmentI,java.util.Map");
444 Clazz.defineMethod (c$, "getShowNonconserved", 
445 function () {
446 return this.showNonconserved;
447 });
448 Clazz.defineMethod (c$, "setShowNonconserved", 
449 function (displayNonconserved) {
450 this.showNonconserved = displayNonconserved;
451 }, "~B");
452 Clazz.defineMethod (c$, "setConsensus", 
453 function (aan) {
454 if (this.consensus == null) {
455 this.consensus = aan;
456 }}, "jalview.datamodel.AlignmentAnnotation");
457 Clazz.defineMethod (c$, "getConsensus", 
458 function () {
459 var aWidth = this.getWidth ();
460 if (aWidth < 0) {
461 return null;
462 }if (this.consensus == null) {
463 this.consensus =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 100, 1);
464 this.consensus.hasText = true;
465 this.consensus.autoCalculated = true;
466 this.consensus.groupRef = this;
467 this.consensus.label = "Consensus for " + this.getName ();
468 this.consensus.description = "Percent Identity";
469 }return this.consensus;
470 });
471 Clazz.defineMethod (c$, "setConservationRow", 
472 function (aan) {
473 if (this.conservation == null) {
474 this.conservation = aan;
475 }}, "jalview.datamodel.AlignmentAnnotation");
476 Clazz.defineMethod (c$, "getConservationRow", 
477 function () {
478 if (this.conservation == null) {
479 this.conservation =  new jalview.datamodel.AlignmentAnnotation ("", "",  new Array (1), 0, 11, 1);
480 }this.conservation.hasText = true;
481 this.conservation.autoCalculated = true;
482 this.conservation.groupRef = this;
483 this.conservation.label = "Conservation for " + this.getName ();
484 this.conservation.description = "Conservation for group " + this.getName () + " less than " + this.consPercGaps + "% gaps";
485 return this.conservation;
486 });
487 Clazz.defineMethod (c$, "hasAnnotationRows", 
488 function () {
489 return this.consensus != null || this.conservation != null;
490 });
491 Clazz.defineMethod (c$, "getConsensusSeq", 
492 function () {
493 this.getConsensus ();
494 var seqs =  new StringBuffer ();
495 for (var i = 0; i < this.consensus.annotations.length; i++) {
496 if (this.consensus.annotations[i] != null) {
497 if (this.consensus.annotations[i].description.charAt (0) == '[') {
498 seqs.append (this.consensus.annotations[i].description.charAt (1));
499 } else {
500 seqs.append (this.consensus.annotations[i].displayCharacter);
501 }}}
502 var sq =  new jalview.datamodel.Sequence ("Group" + this.getName () + " Consensus", seqs.toString ());
503 sq.setDescription ("Percentage Identity Consensus " + ((this.ignoreGapsInConsensus) ? " without gaps" : ""));
504 return sq;
505 });
506 Clazz.defineMethod (c$, "setIgnoreGapsConsensus", 
507 function (state) {
508 if (this.ignoreGapsInConsensus != state && this.consensus != null) {
509 this.ignoreGapsInConsensus = state;
510 this.recalcConservation ();
511 }this.ignoreGapsInConsensus = state;
512 }, "~B");
513 Clazz.defineMethod (c$, "getIgnoreGapsConsensus", 
514 function () {
515 return this.ignoreGapsInConsensus;
516 });
517 Clazz.defineMethod (c$, "setshowSequenceLogo", 
518 function (showSequenceLogo) {
519 if (this.showSequenceLogo != showSequenceLogo && this.consensus != null) {
520 this.showSequenceLogo = showSequenceLogo;
521 this.recalcConservation ();
522 }this.showSequenceLogo = showSequenceLogo;
523 }, "~B");
524 Clazz.defineMethod (c$, "setShowConsensusHistogram", 
525 function (showConsHist) {
526 if (this.showConsensusHistogram != showConsHist && this.consensus != null) {
527 this.showConsensusHistogram = showConsHist;
528 this.recalcConservation ();
529 }this.showConsensusHistogram = showConsHist;
530 }, "~B");
531 Clazz.defineMethod (c$, "isShowConsensusHistogram", 
532 function () {
533 return this.showConsensusHistogram;
534 });
535 Clazz.defineMethod (c$, "setNormaliseSequenceLogo", 
536 function (norm) {
537 this.normaliseSequenceLogo = norm;
538 }, "~B");
539 Clazz.defineMethod (c$, "isNormaliseSequenceLogo", 
540 function () {
541 return this.normaliseSequenceLogo;
542 });
543 Clazz.overrideMethod (c$, "getAlignmentAnnotation", 
544 function () {
545 var annot =  new java.util.ArrayList ();
546 {
547 for (var seq, $seq = this.sequences.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
548 var aa = seq.getAnnotation ();
549 if (aa != null) {
550 for (var al, $al = 0, $$al = aa; $al < $$al.length && ((al = $$al[$al]) || true); $al++) {
551 if (al.groupRef === this) {
552 annot.add (al);
553 }}
554 }}
555 if (this.consensus != null) {
556 annot.add (this.consensus);
557 }if (this.conservation != null) {
558 annot.add (this.conservation);
559 }}return annot.toArray ( new Array (0));
560 });
561 Clazz.overrideMethod (c$, "findAnnotation", 
562 function (calcId) {
563 var aa =  new java.util.ArrayList ();
564 for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {
565 if (a.getCalcId () === calcId) {
566 aa.add (a);
567 }}
568 return aa;
569 }, "~S");
570 Clazz.overrideMethod (c$, "findAnnotations", 
571 function (seq, calcId, label) {
572 var aa =  new java.util.ArrayList ();
573 for (var ann, $ann = 0, $$ann = this.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {
574 if (ann.getCalcId () != null && ann.getCalcId ().equals (calcId) && ann.sequenceRef != null && ann.sequenceRef === seq && ann.label != null && ann.label.equals (label)) {
575 aa.add (ann);
576 }}
577 return aa;
578 }, "jalview.datamodel.SequenceI,~S,~S");
579 Clazz.defineMethod (c$, "hasAnnotation", 
580 function (calcId) {
581 if (calcId != null && !"".equals (calcId)) {
582 for (var a, $a = 0, $$a = this.getAlignmentAnnotation (); $a < $$a.length && ((a = $$a[$a]) || true); $a++) {
583 if (a.getCalcId () === calcId) {
584 return true;
585 }}
586 }return false;
587 }, "~S");
588 Clazz.defineMethod (c$, "clear", 
589 function () {
590 {
591 this.sequences.clear ();
592 }});
593 Clazz.defineMethod (c$, "setContext", 
594 function (context) {
595 this.context = context;
596 }, "jalview.datamodel.AnnotatedCollectionI");
597 Clazz.overrideMethod (c$, "getContext", 
598 function () {
599 return this.context;
600 });
601 });