1 Clazz.declarePackage ("jalview.viewmodel");
\r
2 Clazz.load (["jalview.api.AlignViewportI", "jalview.structure.CommandListener", "$.VamsasSource", "jalview.datamodel.ColumnSelection", "jalview.viewmodel.styles.ViewStyle", "jalview.workers.AlignCalcManager", "java.beans.PropertyChangeSupport", "java.util.ArrayDeque", "$.HashMap"], "jalview.viewmodel.AlignmentViewport", ["jalview.analysis.Conservation", "jalview.datamodel.AlignmentAnnotation", "$.AlignmentView", "$.CigarArray", "$.Sequence", "$.SequenceGroup", "jalview.schemes.Blosum62ColourScheme", "$.PIDColourScheme", "$.ResidueProperties", "jalview.util.Comparison", "$.MappingUtils", "jalview.workers.ComplementConsensusThread", "$.ConsensusThread", "$.ConservationThread", "$.StrucConsensusThread", "java.awt.Color", "java.util.ArrayList", "$.BitSet", "$.Hashtable"], function () {
\r
3 c$ = Clazz.decorateAsClass (function () {
\r
4 this.viewStyle = null;
\r
5 this.codingComplement = null;
\r
6 this.featuresDisplayed = null;
\r
7 this.historyList = null;
\r
8 this.redoList = null;
\r
9 this.alignment = null;
\r
10 this.sequenceSetID = null;
\r
11 this.$isDataset = false;
\r
12 this.hiddenRepSequences = null;
\r
14 this.autoCalculateConsensus = true;
\r
15 this.autoCalculateStrucConsensus = true;
\r
16 this.ignoreGapsInConsensusCalculation = false;
\r
17 this.globalColourScheme = null;
\r
18 this.consensus = null;
\r
19 this.complementConsensus = null;
\r
20 this.strucConsensus = null;
\r
21 this.conservation = null;
\r
22 this.quality = null;
\r
23 this.groupConsensus = null;
\r
24 this.groupConservation = null;
\r
25 this.hconsensus = null;
\r
26 this.hcomplementConsensus = null;
\r
27 this.hStrucConsensus = null;
\r
28 this.hconservation = null;
\r
29 this.ConsPercGaps = 25;
\r
30 this.calculator = null;
\r
31 this.showGroupConservation = false;
\r
32 this.showGroupConsensus = false;
\r
33 this.showSequenceLogo = false;
\r
34 this.normaliseSequenceLogo = false;
\r
35 this.showConsensusHistogram = true;
\r
36 this.padGaps = false;
\r
37 this.sortByTree = false;
\r
38 this.selectionGroup = null;
\r
40 this.sgrouphash = -1;
\r
41 this.colselhash = -1;
\r
42 this.changeSupport = null;
\r
43 this.showConservation = true;
\r
44 this.showQuality = true;
\r
45 this.showConsensus = true;
\r
46 this.sequenceColours = null;
\r
47 this.sortAnnotationsBy = null;
\r
48 this.showAutocalculatedAbove = false;
\r
49 this.followHighlight = true;
\r
54 Clazz.instantialize (this, arguments);
\r
55 }, jalview.viewmodel, "AlignmentViewport", null, [jalview.api.AlignViewportI, jalview.structure.CommandListener, jalview.structure.VamsasSource]);
\r
56 Clazz.prepareFields (c$, function () {
\r
57 this.viewStyle = new jalview.viewmodel.styles.ViewStyle ();
\r
58 this.historyList = new java.util.ArrayDeque ();
\r
59 this.redoList = new java.util.ArrayDeque ();
\r
60 this.colSel = new jalview.datamodel.ColumnSelection ();
\r
61 this.calculator = new jalview.workers.AlignCalcManager ();
\r
62 this.changeSupport = new java.beans.PropertyChangeSupport (this);
\r
63 this.sequenceColours = new java.util.HashMap ();
\r
65 Clazz.defineMethod (c$, "setFontName",
\r
67 this.viewStyle.setFontName (name);
\r
69 Clazz.defineMethod (c$, "setFontStyle",
\r
71 this.viewStyle.setFontStyle (style);
\r
73 Clazz.defineMethod (c$, "setFontSize",
\r
75 this.viewStyle.setFontSize (size);
\r
77 Clazz.defineMethod (c$, "getFontStyle",
\r
79 return this.viewStyle.getFontStyle ();
\r
81 Clazz.defineMethod (c$, "getFontName",
\r
83 return this.viewStyle.getFontName ();
\r
85 Clazz.defineMethod (c$, "getFontSize",
\r
87 return this.viewStyle.getFontSize ();
\r
89 Clazz.defineMethod (c$, "setUpperCasebold",
\r
90 function (upperCasebold) {
\r
91 this.viewStyle.setUpperCasebold (upperCasebold);
\r
93 Clazz.defineMethod (c$, "isUpperCasebold",
\r
95 return this.viewStyle.isUpperCasebold ();
\r
97 Clazz.defineMethod (c$, "isSeqNameItalics",
\r
99 return this.viewStyle.isSeqNameItalics ();
\r
101 Clazz.defineMethod (c$, "setColourByReferenceSeq",
\r
102 function (colourByReferenceSeq) {
\r
103 this.viewStyle.setColourByReferenceSeq (colourByReferenceSeq);
\r
105 Clazz.defineMethod (c$, "setColourAppliesToAllGroups",
\r
107 this.viewStyle.setColourAppliesToAllGroups (b);
\r
109 Clazz.defineMethod (c$, "getColourAppliesToAllGroups",
\r
111 return this.viewStyle.getColourAppliesToAllGroups ();
\r
113 Clazz.defineMethod (c$, "getAbovePIDThreshold",
\r
115 return this.viewStyle.getAbovePIDThreshold ();
\r
117 Clazz.defineMethod (c$, "setIncrement",
\r
119 this.viewStyle.setIncrement (inc);
\r
121 Clazz.defineMethod (c$, "getIncrement",
\r
123 return this.viewStyle.getIncrement ();
\r
125 Clazz.defineMethod (c$, "setConservationSelected",
\r
127 this.viewStyle.setConservationSelected (b);
\r
129 Clazz.defineMethod (c$, "setShowHiddenMarkers",
\r
131 this.viewStyle.setShowHiddenMarkers (show);
\r
133 Clazz.defineMethod (c$, "getShowHiddenMarkers",
\r
135 return this.viewStyle.getShowHiddenMarkers ();
\r
137 Clazz.defineMethod (c$, "setScaleRightWrapped",
\r
139 this.viewStyle.setScaleRightWrapped (b);
\r
141 Clazz.defineMethod (c$, "setScaleLeftWrapped",
\r
143 this.viewStyle.setScaleLeftWrapped (b);
\r
145 Clazz.defineMethod (c$, "setScaleAboveWrapped",
\r
147 this.viewStyle.setScaleAboveWrapped (b);
\r
149 Clazz.defineMethod (c$, "getScaleLeftWrapped",
\r
151 return this.viewStyle.getScaleLeftWrapped ();
\r
153 Clazz.defineMethod (c$, "getScaleAboveWrapped",
\r
155 return this.viewStyle.getScaleAboveWrapped ();
\r
157 Clazz.defineMethod (c$, "getScaleRightWrapped",
\r
159 return this.viewStyle.getScaleRightWrapped ();
\r
161 Clazz.defineMethod (c$, "setAbovePIDThreshold",
\r
163 this.viewStyle.setAbovePIDThreshold (b);
\r
165 Clazz.defineMethod (c$, "setThreshold",
\r
166 function (thresh) {
\r
167 this.viewStyle.setThreshold (thresh);
\r
169 Clazz.defineMethod (c$, "getThreshold",
\r
171 return this.viewStyle.getThreshold ();
\r
173 Clazz.defineMethod (c$, "getShowJVSuffix",
\r
175 return this.viewStyle.getShowJVSuffix ();
\r
177 Clazz.defineMethod (c$, "setShowJVSuffix",
\r
179 this.viewStyle.setShowJVSuffix (b);
\r
181 Clazz.defineMethod (c$, "setWrapAlignment",
\r
183 this.viewStyle.setWrapAlignment (state);
\r
185 Clazz.defineMethod (c$, "setShowText",
\r
187 this.viewStyle.setShowText (state);
\r
189 Clazz.defineMethod (c$, "setRenderGaps",
\r
191 this.viewStyle.setRenderGaps (state);
\r
193 Clazz.defineMethod (c$, "getColourText",
\r
195 return this.viewStyle.getColourText ();
\r
197 Clazz.defineMethod (c$, "setColourText",
\r
199 this.viewStyle.setColourText (state);
\r
201 Clazz.defineMethod (c$, "getWrapAlignment",
\r
203 return this.viewStyle.getWrapAlignment ();
\r
205 Clazz.defineMethod (c$, "getShowText",
\r
207 return this.viewStyle.getShowText ();
\r
209 Clazz.defineMethod (c$, "getWrappedWidth",
\r
211 return this.viewStyle.getWrappedWidth ();
\r
213 Clazz.defineMethod (c$, "setWrappedWidth",
\r
215 this.viewStyle.setWrappedWidth (w);
\r
217 Clazz.defineMethod (c$, "getCharHeight",
\r
219 return this.viewStyle.getCharHeight ();
\r
221 Clazz.defineMethod (c$, "setCharHeight",
\r
223 this.viewStyle.setCharHeight (h);
\r
225 Clazz.defineMethod (c$, "getCharWidth",
\r
227 return this.viewStyle.getCharWidth ();
\r
229 Clazz.defineMethod (c$, "setCharWidth",
\r
231 this.viewStyle.setCharWidth (w);
\r
233 Clazz.defineMethod (c$, "getShowBoxes",
\r
235 return this.viewStyle.getShowBoxes ();
\r
237 Clazz.defineMethod (c$, "getShowUnconserved",
\r
239 return this.viewStyle.getShowUnconserved ();
\r
241 Clazz.defineMethod (c$, "setShowUnconserved",
\r
242 function (showunconserved) {
\r
243 this.viewStyle.setShowUnconserved (showunconserved);
\r
245 Clazz.defineMethod (c$, "setSeqNameItalics",
\r
246 function (default1) {
\r
247 this.viewStyle.setSeqNameItalics (default1);
\r
249 Clazz.defineMethod (c$, "getAlignment",
\r
251 return this.alignment;
\r
253 Clazz.overrideMethod (c$, "getGapCharacter",
\r
255 return this.alignment.getGapCharacter ();
\r
257 Clazz.defineMethod (c$, "setDataset",
\r
259 this.$isDataset = b;
\r
261 Clazz.defineMethod (c$, "isDataset",
\r
263 return this.$isDataset;
\r
265 Clazz.overrideMethod (c$, "setGlobalColourScheme",
\r
267 this.globalColourScheme = cs;
\r
268 var recalc = false;
\r
270 cs.setConservationApplied (recalc = this.getConservationSelected ());
\r
271 if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {
\r
273 cs.setThreshold (this.viewStyle.getThreshold (), this.ignoreGapsInConsensusCalculation);
\r
275 cs.setThreshold (0, this.ignoreGapsInConsensusCalculation);
\r
277 cs.setConsensus (this.hconsensus);
\r
278 cs.setConservation (this.hconservation);
\r
279 }cs.alignmentChanged (this.alignment, this.hiddenRepSequences);
\r
280 }if (this.getColourAppliesToAllGroups ()) {
\r
281 for (var sg, $sg = this.getAlignment ().getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
\r
285 }sg.cs = cs.applyTo (sg, this.getHiddenRepSequences ());
\r
286 sg.setConsPercGaps (this.ConsPercGaps);
\r
287 if (this.getAbovePIDThreshold () || Clazz.instanceOf (cs, jalview.schemes.PIDColourScheme) || Clazz.instanceOf (cs, jalview.schemes.Blosum62ColourScheme)) {
\r
288 sg.cs.setThreshold (this.viewStyle.getThreshold (), this.isIgnoreGapsConsensus ());
\r
291 sg.cs.setThreshold (0, this.isIgnoreGapsConsensus ());
\r
292 }if (this.getConservationSelected ()) {
\r
293 sg.cs.setConservationApplied (true);
\r
296 sg.cs.setConservation (null);
\r
298 sg.recalcConservation ();
\r
300 sg.cs.alignmentChanged (sg, this.hiddenRepSequences);
\r
302 }}, "jalview.schemes.ColourSchemeI");
\r
303 Clazz.overrideMethod (c$, "getGlobalColourScheme",
\r
305 return this.globalColourScheme;
\r
307 Clazz.overrideMethod (c$, "setConservation",
\r
309 this.hconservation = cons;
\r
310 }, "jalview.analysis.Conservation");
\r
311 Clazz.overrideMethod (c$, "getConsPercGaps",
\r
313 return this.ConsPercGaps;
\r
315 Clazz.overrideMethod (c$, "setSequenceConsensusHash",
\r
316 function (hconsensus) {
\r
317 this.hconsensus = hconsensus;
\r
319 Clazz.overrideMethod (c$, "setComplementConsensusHash",
\r
320 function (hconsensus) {
\r
321 this.hcomplementConsensus = hconsensus;
\r
323 Clazz.overrideMethod (c$, "getSequenceConsensusHash",
\r
325 return this.hconsensus;
\r
327 Clazz.overrideMethod (c$, "getComplementConsensusHash",
\r
329 return this.hcomplementConsensus;
\r
331 Clazz.overrideMethod (c$, "getRnaStructureConsensusHash",
\r
333 return this.hStrucConsensus;
\r
335 Clazz.overrideMethod (c$, "setRnaStructureConsensusHash",
\r
336 function (hStrucConsensus) {
\r
337 this.hStrucConsensus = hStrucConsensus;
\r
339 Clazz.overrideMethod (c$, "getAlignmentQualityAnnot",
\r
341 return this.quality;
\r
343 Clazz.overrideMethod (c$, "getAlignmentConservationAnnotation",
\r
345 return this.conservation;
\r
347 Clazz.overrideMethod (c$, "getAlignmentConsensusAnnotation",
\r
349 return this.consensus;
\r
351 Clazz.overrideMethod (c$, "getComplementConsensusAnnotation",
\r
353 return this.complementConsensus;
\r
355 Clazz.overrideMethod (c$, "getAlignmentStrucConsensusAnnotation",
\r
357 return this.strucConsensus;
\r
359 Clazz.defineMethod (c$, "updateConservation",
\r
361 if (this.alignment.isNucleotide () || this.conservation == null || !this.autoCalculateConsensus) {
\r
363 }if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConservationThread) == null) {
\r
364 this.calculator.registerWorker ( new jalview.workers.ConservationThread (this, ap));
\r
365 }}, "jalview.api.AlignmentViewPanel");
\r
366 Clazz.defineMethod (c$, "updateConsensus",
\r
368 if (this.consensus == null || !this.autoCalculateConsensus) {
\r
370 }if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ConsensusThread) == null) {
\r
371 this.calculator.registerWorker ( new jalview.workers.ConsensusThread (this, ap));
\r
372 }var al = this.getAlignment ();
\r
373 if (!al.isNucleotide () && al.getCodonFrames () != null && !al.getCodonFrames ().isEmpty ()) {
\r
374 if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.ComplementConsensusThread) == null) {
\r
375 this.calculator.registerWorker ( new jalview.workers.ComplementConsensusThread (this, ap));
\r
376 }}}, "jalview.api.AlignmentViewPanel");
\r
377 Clazz.defineMethod (c$, "updateStrucConsensus",
\r
379 if (this.autoCalculateStrucConsensus && this.strucConsensus == null && this.alignment.isNucleotide () && this.alignment.hasRNAStructure ()) {
\r
380 this.initRNAStructure ();
\r
381 }if (this.strucConsensus == null || !this.autoCalculateStrucConsensus) {
\r
383 }if (this.calculator.getRegisteredWorkersOfClass (jalview.workers.StrucConsensusThread) == null) {
\r
384 this.calculator.registerWorker ( new jalview.workers.StrucConsensusThread (this, ap));
\r
385 }}, "jalview.api.AlignmentViewPanel");
\r
386 Clazz.defineMethod (c$, "isCalcInProgress",
\r
388 return this.calculator.isWorking ();
\r
390 Clazz.overrideMethod (c$, "isCalculationInProgress",
\r
391 function (alignmentAnnotation) {
\r
392 if (!alignmentAnnotation.autoCalculated) {
\r
394 }if (this.calculator.workingInvolvedWith (alignmentAnnotation)) {
\r
397 }, "jalview.datamodel.AlignmentAnnotation");
\r
398 Clazz.overrideMethod (c$, "isClosed",
\r
400 return this.alignment == null;
\r
402 Clazz.overrideMethod (c$, "getCalcManager",
\r
404 return this.calculator;
\r
406 Clazz.overrideMethod (c$, "isShowSequenceLogo",
\r
408 return this.showSequenceLogo;
\r
410 Clazz.defineMethod (c$, "setShowSequenceLogo",
\r
411 function (showSequenceLogo) {
\r
412 if (showSequenceLogo != this.showSequenceLogo) {
\r
413 this.showSequenceLogo = showSequenceLogo;
\r
414 this.calculator.updateAnnotationFor (jalview.workers.ConsensusThread);
\r
415 this.calculator.updateAnnotationFor (jalview.workers.ComplementConsensusThread);
\r
416 this.calculator.updateAnnotationFor (jalview.workers.StrucConsensusThread);
\r
417 }this.showSequenceLogo = showSequenceLogo;
\r
419 Clazz.defineMethod (c$, "setShowConsensusHistogram",
\r
420 function (showConsensusHistogram) {
\r
421 this.showConsensusHistogram = showConsensusHistogram;
\r
423 Clazz.defineMethod (c$, "isShowGroupConservation",
\r
425 return this.showGroupConservation;
\r
427 Clazz.defineMethod (c$, "setShowGroupConservation",
\r
428 function (showGroupConservation) {
\r
429 this.showGroupConservation = showGroupConservation;
\r
431 Clazz.defineMethod (c$, "isShowGroupConsensus",
\r
433 return this.showGroupConsensus;
\r
435 Clazz.defineMethod (c$, "setShowGroupConsensus",
\r
436 function (showGroupConsensus) {
\r
437 this.showGroupConsensus = showGroupConsensus;
\r
439 Clazz.overrideMethod (c$, "isShowConsensusHistogram",
\r
441 return this.showConsensusHistogram;
\r
443 Clazz.overrideMethod (c$, "getSelectionGroup",
\r
445 return this.selectionGroup;
\r
447 Clazz.overrideMethod (c$, "setSelectionGroup",
\r
449 this.selectionGroup = sg;
\r
450 }, "jalview.datamodel.SequenceGroup");
\r
451 Clazz.defineMethod (c$, "setHiddenColumns",
\r
452 function (colsel) {
\r
453 this.colSel = colsel;
\r
454 }, "jalview.datamodel.ColumnSelection");
\r
455 Clazz.overrideMethod (c$, "getColumnSelection",
\r
457 return this.colSel;
\r
459 Clazz.overrideMethod (c$, "setColumnSelection",
\r
460 function (colSel) {
\r
461 this.colSel = colSel;
\r
462 if (colSel != null) {
\r
463 this.updateHiddenColumns ();
\r
464 }}, "jalview.datamodel.ColumnSelection");
\r
465 Clazz.overrideMethod (c$, "getHiddenRepSequences",
\r
467 return this.hiddenRepSequences;
\r
469 Clazz.overrideMethod (c$, "setHiddenRepSequences",
\r
470 function (hiddenRepSequences) {
\r
471 this.hiddenRepSequences = hiddenRepSequences;
\r
472 }, "java.util.Map");
\r
473 Clazz.overrideMethod (c$, "hasHiddenColumns",
\r
475 return this.colSel != null && this.colSel.hasHiddenColumns ();
\r
477 Clazz.defineMethod (c$, "updateHiddenColumns",
\r
480 Clazz.overrideMethod (c$, "hasHiddenRows",
\r
482 return this.alignment.getHiddenSequences ().getSize () > 0;
\r
484 Clazz.defineMethod (c$, "setSequenceSetId",
\r
486 if (this.sequenceSetID != null) {
\r
487 System.err.println ("Warning - overwriting a sequenceSetId for a viewport!");
\r
488 }this.sequenceSetID = String.instantialize (newid);
\r
490 Clazz.overrideMethod (c$, "getSequenceSetId",
\r
492 if (this.sequenceSetID == null) {
\r
493 this.sequenceSetID = this.alignment.hashCode () + "";
\r
494 }return this.sequenceSetID;
\r
496 Clazz.overrideMethod (c$, "getViewId",
\r
498 if (this.viewId == null) {
\r
499 this.viewId = this.getSequenceSetId () + "." + this.hashCode () + "";
\r
500 }return this.viewId;
\r
502 Clazz.defineMethod (c$, "setIgnoreGapsConsensus",
\r
504 this.ignoreGapsInConsensusCalculation = b;
\r
506 this.updateConsensus (ap);
\r
507 if (this.globalColourScheme != null) {
\r
508 this.globalColourScheme.setThreshold (this.globalColourScheme.getThreshold (), this.ignoreGapsInConsensusCalculation);
\r
509 }}}, "~B,jalview.api.AlignmentViewPanel");
\r
510 Clazz.defineMethod (c$, "isSelectionGroupChanged",
\r
512 var hc = (this.selectionGroup == null || this.selectionGroup.getSize () == 0) ? -1 : this.selectionGroup.hashCode ();
\r
513 if (hc != -1 && hc != this.sgrouphash) {
\r
515 this.sgrouphash = hc;
\r
519 Clazz.defineMethod (c$, "isColSelChanged",
\r
521 var hc = (this.colSel == null || this.colSel.size () == 0) ? -1 : this.colSel.hashCode ();
\r
522 if (hc != -1 && hc != this.colselhash) {
\r
524 this.colselhash = hc;
\r
528 Clazz.overrideMethod (c$, "isIgnoreGapsConsensus",
\r
530 return this.ignoreGapsInConsensusCalculation;
\r
532 Clazz.defineMethod (c$, "addPropertyChangeListener",
\r
533 function (listener) {
\r
534 this.changeSupport.addPropertyChangeListener (listener);
\r
535 }, "java.beans.PropertyChangeListener");
\r
536 Clazz.defineMethod (c$, "removePropertyChangeListener",
\r
537 function (listener) {
\r
538 this.changeSupport.removePropertyChangeListener (listener);
\r
539 }, "java.beans.PropertyChangeListener");
\r
540 Clazz.defineMethod (c$, "firePropertyChange",
\r
541 function (prop, oldvalue, newvalue) {
\r
542 this.changeSupport.firePropertyChange (prop, oldvalue, newvalue);
\r
544 Clazz.defineMethod (c$, "hideSelectedColumns",
\r
546 if (this.colSel.size () < 1) {
\r
548 }this.colSel.hideSelectedColumns ();
\r
549 this.setSelectionGroup (null);
\r
551 Clazz.defineMethod (c$, "hideColumns",
\r
552 function (start, end) {
\r
553 if (start == end) {
\r
554 this.colSel.hideColumns (start);
\r
556 this.colSel.hideColumns (start, end);
\r
558 Clazz.defineMethod (c$, "showColumn",
\r
560 this.colSel.revealHiddenColumns (col);
\r
562 Clazz.defineMethod (c$, "showAllHiddenColumns",
\r
564 this.colSel.revealAllHiddenColumns ();
\r
566 Clazz.defineMethod (c$, "showAllHiddenSeqs",
\r
568 if (this.alignment.getHiddenSequences ().getSize () > 0) {
\r
569 if (this.selectionGroup == null) {
\r
570 this.selectionGroup = new jalview.datamodel.SequenceGroup ();
\r
571 this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);
\r
572 }var tmp = this.alignment.getHiddenSequences ().showAll (this.hiddenRepSequences);
\r
573 for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
\r
574 this.selectionGroup.addSequence (seq, false);
\r
575 this.setSequenceAnnotationsVisible (seq, true);
\r
577 this.hiddenRepSequences = null;
\r
578 this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
\r
579 this.sendSelection ();
\r
581 Clazz.defineMethod (c$, "showSequence",
\r
583 var tmp = this.alignment.getHiddenSequences ().showSequence (index, this.hiddenRepSequences);
\r
584 if (tmp.size () > 0) {
\r
585 if (this.selectionGroup == null) {
\r
586 this.selectionGroup = new jalview.datamodel.SequenceGroup ();
\r
587 this.selectionGroup.setEndRes (this.alignment.getWidth () - 1);
\r
588 }for (var seq, $seq = tmp.iterator (); $seq.hasNext () && ((seq = $seq.next ()) || true);) {
\r
589 this.selectionGroup.addSequence (seq, false);
\r
590 this.setSequenceAnnotationsVisible (seq, true);
\r
592 this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
\r
593 this.sendSelection ();
\r
595 Clazz.defineMethod (c$, "hideAllSelectedSeqs",
\r
597 if (this.selectionGroup == null || this.selectionGroup.getSize () < 1) {
\r
599 }var seqs = this.selectionGroup.getSequencesInOrder (this.alignment);
\r
600 this.hideSequence (seqs);
\r
601 this.setSelectionGroup (null);
\r
603 Clazz.defineMethod (c$, "hideSequence",
\r
606 for (var i = 0; i < seq.length; i++) {
\r
607 this.alignment.getHiddenSequences ().hideSequence (seq[i]);
\r
608 this.setSequenceAnnotationsVisible (seq[i], false);
\r
610 this.firePropertyChange ("alignment", null, this.alignment.getSequences ());
\r
612 Clazz.defineMethod (c$, "setSequenceAnnotationsVisible",
\r
613 function (sequenceI, visible) {
\r
614 for (var ann, $ann = 0, $$ann = this.alignment.getAlignmentAnnotation (); $ann < $$ann.length && ((ann = $$ann[$ann]) || true); $ann++) {
\r
615 if (ann.sequenceRef === sequenceI) {
\r
616 ann.visible = visible;
\r
618 }, "jalview.datamodel.SequenceI,~B");
\r
619 Clazz.defineMethod (c$, "hideRepSequences",
\r
620 function (repSequence, sg) {
\r
621 var sSize = sg.getSize ();
\r
624 }if (this.hiddenRepSequences == null) {
\r
625 this.hiddenRepSequences = new java.util.Hashtable ();
\r
626 }this.hiddenRepSequences.put (repSequence, sg);
\r
627 var seqs = new Array (sSize - 1);
\r
629 for (var i = 0; i < sSize; i++) {
\r
630 if (sg.getSequenceAt (i) !== repSequence) {
\r
631 if (index == sSize - 1) {
\r
633 }seqs[index++] = sg.getSequenceAt (i);
\r
635 sg.setSeqrep (repSequence);
\r
636 sg.setHidereps (true);
\r
637 this.hideSequence (seqs);
\r
638 }, "jalview.datamodel.SequenceI,jalview.datamodel.SequenceGroup");
\r
639 Clazz.defineMethod (c$, "isHiddenRepSequence",
\r
641 return this.alignment.getSeqrep () === seq || (this.hiddenRepSequences != null && this.hiddenRepSequences.containsKey (seq));
\r
642 }, "jalview.datamodel.SequenceI");
\r
643 Clazz.defineMethod (c$, "getRepresentedSequences",
\r
645 return (this.hiddenRepSequences == null ? null : this.hiddenRepSequences.get (seq));
\r
646 }, "jalview.datamodel.SequenceI");
\r
647 Clazz.overrideMethod (c$, "adjustForHiddenSeqs",
\r
648 function (alignmentIndex) {
\r
649 return this.alignment.getHiddenSequences ().adjustForHiddenSeqs (alignmentIndex);
\r
651 Clazz.overrideMethod (c$, "invertColumnSelection",
\r
653 this.colSel.invertColumnSelection (0, this.alignment.getWidth ());
\r
655 Clazz.overrideMethod (c$, "getSelectionAsNewSequence",
\r
658 if (this.selectionGroup == null || this.selectionGroup.getSize () == 0) {
\r
659 sequences = this.alignment.getSequencesArray ();
\r
660 var annots = this.alignment.getAlignmentAnnotation ();
\r
661 for (var i = 0; i < sequences.length; i++) {
\r
662 sequences[i] = new jalview.datamodel.Sequence (sequences[i], annots);
\r
665 sequences = this.selectionGroup.getSelectionAsNewSequences (this.alignment);
\r
668 Clazz.overrideMethod (c$, "getSequenceSelection",
\r
670 var sequences = null;
\r
671 if (this.selectionGroup != null) {
\r
672 sequences = this.selectionGroup.getSequencesInOrder (this.alignment);
\r
673 }if (sequences == null) {
\r
674 sequences = this.alignment.getSequencesArray ();
\r
677 Clazz.overrideMethod (c$, "getViewAsCigars",
\r
678 function (selectedRegionOnly) {
\r
679 return new jalview.datamodel.CigarArray (this.alignment, this.colSel, (selectedRegionOnly ? this.selectionGroup : null));
\r
681 Clazz.defineMethod (c$, "getAlignmentView",
\r
682 function (selectedOnly) {
\r
683 return this.getAlignmentView (selectedOnly, false);
\r
685 Clazz.defineMethod (c$, "getAlignmentView",
\r
686 function (selectedOnly, markGroups) {
\r
687 return new jalview.datamodel.AlignmentView (this.alignment, this.colSel, this.selectionGroup, this.colSel != null && this.colSel.hasHiddenColumns (), selectedOnly, markGroups);
\r
689 Clazz.overrideMethod (c$, "getViewAsString",
\r
690 function (selectedRegionOnly) {
\r
691 var selection = null;
\r
697 if (selectedRegionOnly && this.selectionGroup != null) {
\r
698 iSize = this.selectionGroup.getSize ();
\r
699 seqs = this.selectionGroup.getSequencesInOrder (this.alignment);
\r
700 start = this.selectionGroup.getStartRes ();
\r
701 end = this.selectionGroup.getEndRes () + 1;
\r
703 iSize = this.alignment.getHeight ();
\r
704 seqs = this.alignment.getSequencesArray ();
\r
705 end = this.alignment.getWidth ();
\r
706 }selection = new Array (iSize);
\r
707 if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
\r
708 selection = this.colSel.getVisibleSequenceStrings (start, end, seqs);
\r
710 for (i = 0; i < iSize; i++) {
\r
711 selection[i] = seqs[i].getSequenceAsString (start, end);
\r
715 Clazz.overrideMethod (c$, "getVisibleRegionBoundaries",
\r
716 function (min, max) {
\r
717 var regions = new java.util.ArrayList ();
\r
721 if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
\r
723 start = this.colSel.adjustForHiddenColumns (start);
\r
724 }end = this.colSel.getHiddenBoundaryRight (start);
\r
725 if (start == end) {
\r
729 }}regions.add ( Clazz.newIntArray (-1, [start, end]));
\r
730 if (this.colSel != null && this.colSel.hasHiddenColumns ()) {
\r
731 start = this.colSel.adjustForHiddenColumns (end);
\r
732 start = this.colSel.getHiddenBoundaryLeft (start) + 1;
\r
733 }} while (end < max);
\r
734 var startEnd = Clazz.newIntArray (regions.size (), 2, 0);
\r
737 Clazz.overrideMethod (c$, "getVisibleAlignmentAnnotation",
\r
738 function (selectedOnly) {
\r
739 var ala = new java.util.ArrayList ();
\r
741 if ((aa = this.alignment.getAlignmentAnnotation ()) != null) {
\r
742 for (var annot, $annot = 0, $$annot = aa; $annot < $$annot.length && ((annot = $$annot[$annot]) || true); $annot++) {
\r
743 var clone = new jalview.datamodel.AlignmentAnnotation (annot);
\r
744 if (selectedOnly && this.selectionGroup != null) {
\r
745 this.colSel.makeVisibleAnnotation (this.selectionGroup.getStartRes (), this.selectionGroup.getEndRes (), clone);
\r
747 this.colSel.makeVisibleAnnotation (clone);
\r
752 Clazz.overrideMethod (c$, "isPadGaps",
\r
754 return this.padGaps;
\r
756 Clazz.overrideMethod (c$, "setPadGaps",
\r
757 function (padGaps) {
\r
758 this.padGaps = padGaps;
\r
760 Clazz.overrideMethod (c$, "alignmentChanged",
\r
762 if (this.isPadGaps ()) {
\r
763 this.alignment.padGaps ();
\r
764 }if (this.autoCalculateConsensus) {
\r
765 this.updateConsensus (ap);
\r
766 }if (this.hconsensus != null && this.autoCalculateConsensus) {
\r
767 this.updateConservation (ap);
\r
768 }if (this.autoCalculateStrucConsensus) {
\r
769 this.updateStrucConsensus (ap);
\r
770 }var alWidth = this.alignment.getWidth ();
\r
771 var groups = this.alignment.getGroups ();
\r
772 if (groups != null) {
\r
773 for (var sg, $sg = groups.iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
\r
774 if (sg.getEndRes () > alWidth) {
\r
775 sg.setEndRes (alWidth - 1);
\r
777 }if (this.selectionGroup != null && this.selectionGroup.getEndRes () > alWidth) {
\r
778 this.selectionGroup.setEndRes (alWidth - 1);
\r
779 }this.resetAllColourSchemes ();
\r
780 this.calculator.restartWorkers ();
\r
781 }, "jalview.api.AlignmentViewPanel");
\r
782 Clazz.defineMethod (c$, "resetAllColourSchemes",
\r
784 var cs = this.globalColourScheme;
\r
786 cs.alignmentChanged (this.alignment, this.hiddenRepSequences);
\r
787 cs.setConsensus (this.hconsensus);
\r
788 if (cs.conservationApplied ()) {
\r
789 cs.setConservation (jalview.analysis.Conservation.calculateConservation ("All", jalview.schemes.ResidueProperties.propHash, 3, this.alignment.getSequences (), 0, this.alignment.getWidth (), false, this.getConsPercGaps (), false));
\r
790 }}for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
\r
791 if (sg.cs != null) {
\r
792 sg.cs.alignmentChanged (sg, this.hiddenRepSequences);
\r
793 }sg.recalcConservation ();
\r
796 Clazz.defineMethod (c$, "initAutoAnnotation",
\r
798 if (this.hconsensus == null && !this.$isDataset) {
\r
799 if (!this.alignment.isNucleotide ()) {
\r
800 this.initConservation ();
\r
801 this.initQuality ();
\r
803 this.initRNAStructure ();
\r
804 }this.consensus = new jalview.datamodel.AlignmentAnnotation ("Consensus", "PID", new Array (1), 0, 100, 1);
\r
805 this.initConsensus (this.consensus);
\r
806 this.initComplementConsensus ();
\r
808 Clazz.defineMethod (c$, "initComplementConsensus",
\r
810 if (!this.alignment.isNucleotide ()) {
\r
811 var codonMappings = this.alignment.getCodonFrames ();
\r
812 if (codonMappings != null && !codonMappings.isEmpty ()) {
\r
813 this.complementConsensus = new jalview.datamodel.AlignmentAnnotation ("cDNA Consensus", "PID for cDNA", new Array (1), 0, 100, 1);
\r
814 this.initConsensus (this.complementConsensus);
\r
816 Clazz.defineMethod (c$, "initConsensus",
\r
819 aa.autoCalculated = true;
\r
820 if (this.showConsensus) {
\r
821 this.alignment.addAnnotation (aa);
\r
822 }}, "jalview.datamodel.AlignmentAnnotation");
\r
823 Clazz.defineMethod (c$, "initConservation",
\r
825 if (this.showConservation) {
\r
826 if (this.conservation == null) {
\r
827 this.conservation = new jalview.datamodel.AlignmentAnnotation ("Conservation", "Conservation of total alignment less than " + this.getConsPercGaps () + "% gaps", new Array (1), 0, 11, 1);
\r
828 this.conservation.hasText = true;
\r
829 this.conservation.autoCalculated = true;
\r
830 this.alignment.addAnnotation (this.conservation);
\r
832 Clazz.defineMethod (c$, "initQuality",
\r
834 if (this.showQuality) {
\r
835 if (this.quality == null) {
\r
836 this.quality = new jalview.datamodel.AlignmentAnnotation ("Quality", "Alignment Quality based on Blosum62 scores", new Array (1), 0, 11, 1);
\r
837 this.quality.hasText = true;
\r
838 this.quality.autoCalculated = true;
\r
839 this.alignment.addAnnotation (this.quality);
\r
841 Clazz.defineMethod (c$, "initRNAStructure",
\r
843 if (this.alignment.hasRNAStructure () && this.strucConsensus == null) {
\r
844 this.strucConsensus = new jalview.datamodel.AlignmentAnnotation ("StrucConsensus", "PID", new Array (1), 0, 100, 1);
\r
845 this.strucConsensus.hasText = true;
\r
846 this.strucConsensus.autoCalculated = true;
\r
847 if (this.showConsensus) {
\r
848 this.alignment.addAnnotation (this.strucConsensus);
\r
850 Clazz.overrideMethod (c$, "calcPanelHeight",
\r
852 var anns = this.getAlignment ().getAlignmentAnnotation ();
\r
854 var charHeight = this.getCharHeight ();
\r
855 if (anns != null) {
\r
856 var graphgrp = new java.util.BitSet ();
\r
857 for (var aa, $aa = 0, $$aa = anns; $aa < $$aa.length && ((aa = $$aa[$aa]) || true); $aa++) {
\r
859 System.err.println ("Null annotation row: ignoring.");
\r
861 }if (!aa.visible) {
\r
863 }if (aa.graphGroup > -1) {
\r
864 if (graphgrp.get (aa.graphGroup)) {
\r
867 graphgrp.set (aa.graphGroup);
\r
870 aa.height += charHeight;
\r
871 }if (aa.hasIcons) {
\r
873 }if (aa.graph > 0) {
\r
874 aa.height += aa.graphHeight;
\r
875 }if (aa.height == 0) {
\r
877 }height += aa.height;
\r
879 }if (height == 0) {
\r
883 Clazz.overrideMethod (c$, "updateGroupAnnotationSettings",
\r
884 function (applyGlobalSettings, preserveNewGroupSettings) {
\r
885 var updateCalcs = false;
\r
886 var conv = this.isShowGroupConservation ();
\r
887 var cons = this.isShowGroupConsensus ();
\r
888 var showprf = this.isShowSequenceLogo ();
\r
889 var showConsHist = this.isShowConsensusHistogram ();
\r
890 var normLogo = this.isNormaliseSequenceLogo ();
\r
892 var aan = this.alignment.getAlignmentAnnotation ();
\r
893 var oldrfs = new java.util.ArrayList ();
\r
895 for (var an = 0; an < aan.length; an++) {
\r
896 if (aan[an].autoCalculated && aan[an].groupRef != null) {
\r
897 oldrfs.add (aan[an].groupRef);
\r
898 this.alignment.deleteAnnotation (aan[an], false);
\r
900 }if (this.alignment.getGroups () != null) {
\r
901 for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
\r
902 updateCalcs = false;
\r
903 if (applyGlobalSettings || (!preserveNewGroupSettings && !oldrfs.contains (sg))) {
\r
904 sg.setshowSequenceLogo (showprf);
\r
905 sg.setShowConsensusHistogram (showConsHist);
\r
906 sg.setNormaliseSequenceLogo (normLogo);
\r
908 updateCalcs = true;
\r
909 this.alignment.addAnnotation (sg.getConservationRow (), 0);
\r
911 updateCalcs = true;
\r
912 this.alignment.addAnnotation (sg.getConsensus (), 0);
\r
913 }if (updateCalcs) {
\r
914 sg.recalcConservation ();
\r
918 Clazz.defineMethod (c$, "isDisplayReferenceSeq",
\r
920 return this.alignment.hasSeqrep () && this.viewStyle.isDisplayReferenceSeq ();
\r
922 Clazz.defineMethod (c$, "setDisplayReferenceSeq",
\r
923 function (displayReferenceSeq) {
\r
924 this.viewStyle.setDisplayReferenceSeq (displayReferenceSeq);
\r
926 Clazz.defineMethod (c$, "isColourByReferenceSeq",
\r
928 return this.alignment.hasSeqrep () && this.viewStyle.isColourByReferenceSeq ();
\r
930 Clazz.overrideMethod (c$, "getSequenceColour",
\r
932 var sqc = this.sequenceColours.get (seq);
\r
933 return (sqc == null ? java.awt.Color.white : sqc);
\r
934 }, "jalview.datamodel.SequenceI");
\r
935 Clazz.overrideMethod (c$, "setSequenceColour",
\r
936 function (seq, col) {
\r
938 this.sequenceColours.remove (seq);
\r
940 this.sequenceColours.put (seq, col);
\r
941 }}, "jalview.datamodel.SequenceI,java.awt.Color");
\r
942 Clazz.overrideMethod (c$, "updateSequenceIdColours",
\r
944 for (var sg, $sg = this.alignment.getGroups ().iterator (); $sg.hasNext () && ((sg = $sg.next ()) || true);) {
\r
945 if (sg.idColour != null) {
\r
946 for (var s, $s = sg.getSequences (this.getHiddenRepSequences ()).iterator (); $s.hasNext () && ((s = $s.next ()) || true);) {
\r
947 this.sequenceColours.put (s, sg.idColour);
\r
951 Clazz.overrideMethod (c$, "clearSequenceColours",
\r
953 this.sequenceColours.clear ();
\r
955 Clazz.defineMethod (c$, "getCodingComplement",
\r
957 return this.codingComplement;
\r
959 Clazz.defineMethod (c$, "setCodingComplement",
\r
962 System.err.println ("Ignoring recursive setCodingComplement request");
\r
964 this.codingComplement = av;
\r
965 if (av.getCodingComplement () !== this) {
\r
966 av.setCodingComplement (this);
\r
967 }}}, "jalview.api.AlignViewportI");
\r
968 Clazz.overrideMethod (c$, "isNucleotide",
\r
970 return this.getAlignment () == null ? false : this.getAlignment ().isNucleotide ();
\r
972 Clazz.overrideMethod (c$, "getFeaturesDisplayed",
\r
974 return this.featuresDisplayed;
\r
976 Clazz.overrideMethod (c$, "setFeaturesDisplayed",
\r
977 function (featuresDisplayedI) {
\r
978 this.featuresDisplayed = featuresDisplayedI;
\r
979 }, "jalview.api.FeaturesDisplayedI");
\r
980 Clazz.overrideMethod (c$, "areFeaturesDisplayed",
\r
982 return this.featuresDisplayed != null && this.featuresDisplayed.getRegisterdFeaturesCount () > 0;
\r
984 Clazz.defineMethod (c$, "setShowSequenceFeatures",
\r
986 this.viewStyle.setShowSequenceFeatures (b);
\r
988 Clazz.defineMethod (c$, "isShowSequenceFeatures",
\r
990 return this.viewStyle.isShowSequenceFeatures ();
\r
992 Clazz.defineMethod (c$, "setShowSequenceFeaturesHeight",
\r
993 function (selected) {
\r
994 this.viewStyle.setShowSequenceFeaturesHeight (selected);
\r
996 Clazz.defineMethod (c$, "isShowSequenceFeaturesHeight",
\r
998 return this.viewStyle.isShowSequenceFeaturesHeight ();
\r
1000 Clazz.defineMethod (c$, "setShowAnnotation",
\r
1002 this.viewStyle.setShowAnnotation (b);
\r
1004 Clazz.defineMethod (c$, "isShowAnnotation",
\r
1006 return this.viewStyle.isShowAnnotation ();
\r
1008 Clazz.defineMethod (c$, "isRightAlignIds",
\r
1010 return this.viewStyle.isRightAlignIds ();
\r
1012 Clazz.defineMethod (c$, "setRightAlignIds",
\r
1013 function (rightAlignIds) {
\r
1014 this.viewStyle.setRightAlignIds (rightAlignIds);
\r
1016 Clazz.defineMethod (c$, "getConservationSelected",
\r
1018 return this.viewStyle.getConservationSelected ();
\r
1020 Clazz.defineMethod (c$, "setShowBoxes",
\r
1021 function (state) {
\r
1022 this.viewStyle.setShowBoxes (state);
\r
1024 Clazz.defineMethod (c$, "getTextColour",
\r
1026 return this.viewStyle.getTextColour ();
\r
1028 Clazz.defineMethod (c$, "getTextColour2",
\r
1030 return this.viewStyle.getTextColour2 ();
\r
1032 Clazz.defineMethod (c$, "getThresholdTextColour",
\r
1034 return this.viewStyle.getThresholdTextColour ();
\r
1036 Clazz.defineMethod (c$, "isConservationColourSelected",
\r
1038 return this.viewStyle.isConservationColourSelected ();
\r
1040 Clazz.defineMethod (c$, "isRenderGaps",
\r
1042 return this.viewStyle.isRenderGaps ();
\r
1044 Clazz.defineMethod (c$, "isShowColourText",
\r
1046 return this.viewStyle.isShowColourText ();
\r
1048 Clazz.defineMethod (c$, "setConservationColourSelected",
\r
1049 function (conservationColourSelected) {
\r
1050 this.viewStyle.setConservationColourSelected (conservationColourSelected);
\r
1052 Clazz.defineMethod (c$, "setShowColourText",
\r
1053 function (showColourText) {
\r
1054 this.viewStyle.setShowColourText (showColourText);
\r
1056 Clazz.defineMethod (c$, "setTextColour",
\r
1057 function (textColour) {
\r
1058 this.viewStyle.setTextColour (textColour);
\r
1059 }, "java.awt.Color");
\r
1060 Clazz.defineMethod (c$, "setThresholdTextColour",
\r
1061 function (thresholdTextColour) {
\r
1062 this.viewStyle.setThresholdTextColour (thresholdTextColour);
\r
1064 Clazz.defineMethod (c$, "setTextColour2",
\r
1065 function (textColour2) {
\r
1066 this.viewStyle.setTextColour2 (textColour2);
\r
1067 }, "java.awt.Color");
\r
1068 Clazz.overrideMethod (c$, "getViewStyle",
\r
1070 return new jalview.viewmodel.styles.ViewStyle (this.viewStyle);
\r
1072 Clazz.overrideMethod (c$, "setViewStyle",
\r
1073 function (settingsForView) {
\r
1074 this.viewStyle = new jalview.viewmodel.styles.ViewStyle (settingsForView);
\r
1075 }, "jalview.api.ViewStyleI");
\r
1076 Clazz.defineMethod (c$, "sameStyle",
\r
1078 return this.viewStyle.sameStyle (them);
\r
1079 }, "jalview.api.ViewStyleI");
\r
1080 Clazz.defineMethod (c$, "getIdWidth",
\r
1082 return this.viewStyle.getIdWidth ();
\r
1084 Clazz.defineMethod (c$, "setIdWidth",
\r
1086 this.viewStyle.setIdWidth (i);
\r
1088 Clazz.defineMethod (c$, "isCentreColumnLabels",
\r
1090 return this.viewStyle.isCentreColumnLabels ();
\r
1092 Clazz.defineMethod (c$, "setCentreColumnLabels",
\r
1093 function (centreColumnLabels) {
\r
1094 this.viewStyle.setCentreColumnLabels (centreColumnLabels);
\r
1096 Clazz.defineMethod (c$, "setShowDBRefs",
\r
1097 function (showdbrefs) {
\r
1098 this.viewStyle.setShowDBRefs (showdbrefs);
\r
1100 Clazz.defineMethod (c$, "isShowDBRefs",
\r
1102 return this.viewStyle.isShowDBRefs ();
\r
1104 Clazz.defineMethod (c$, "isShowNPFeats",
\r
1106 return this.viewStyle.isShowNPFeats ();
\r
1108 Clazz.defineMethod (c$, "setShowNPFeats",
\r
1109 function (shownpfeats) {
\r
1110 this.viewStyle.setShowNPFeats (shownpfeats);
\r
1112 Clazz.defineMethod (c$, "addToHistoryList",
\r
1113 function (command) {
\r
1114 if (this.historyList != null) {
\r
1115 this.historyList.push (command);
\r
1116 this.broadcastCommand (command, false);
\r
1117 }}, "jalview.commands.CommandI");
\r
1118 Clazz.defineMethod (c$, "broadcastCommand",
\r
1119 function (command, undo) {
\r
1120 this.getStructureSelectionManager ().commandPerformed (command, undo, this.getVamsasSource ());
\r
1121 }, "jalview.commands.CommandI,~B");
\r
1122 Clazz.defineMethod (c$, "addToRedoList",
\r
1123 function (command) {
\r
1124 if (this.redoList != null) {
\r
1125 this.redoList.push (command);
\r
1126 }this.broadcastCommand (command, true);
\r
1127 }, "jalview.commands.CommandI");
\r
1128 Clazz.defineMethod (c$, "clearRedoList",
\r
1130 if (this.redoList != null) {
\r
1131 this.redoList.clear ();
\r
1133 Clazz.defineMethod (c$, "setHistoryList",
\r
1135 this.historyList = list;
\r
1136 }, "java.util.Deque");
\r
1137 Clazz.defineMethod (c$, "getHistoryList",
\r
1139 return this.historyList;
\r
1141 Clazz.defineMethod (c$, "setRedoList",
\r
1143 this.redoList = list;
\r
1144 }, "java.util.Deque");
\r
1145 Clazz.defineMethod (c$, "getRedoList",
\r
1147 return this.redoList;
\r
1149 Clazz.overrideMethod (c$, "getVamsasSource",
\r
1153 Clazz.defineMethod (c$, "getSortAnnotationsBy",
\r
1155 return this.sortAnnotationsBy;
\r
1157 Clazz.defineMethod (c$, "setSortAnnotationsBy",
\r
1158 function (sortAnnotationsBy) {
\r
1159 this.sortAnnotationsBy = sortAnnotationsBy;
\r
1160 }, "jalview.analysis.AnnotationSorter.SequenceAnnotationOrder");
\r
1161 Clazz.defineMethod (c$, "isShowAutocalculatedAbove",
\r
1163 return this.showAutocalculatedAbove;
\r
1165 Clazz.defineMethod (c$, "setShowAutocalculatedAbove",
\r
1166 function (showAutocalculatedAbove) {
\r
1167 this.showAutocalculatedAbove = showAutocalculatedAbove;
\r
1169 Clazz.defineMethod (c$, "isScaleProteinAsCdna",
\r
1171 return this.viewStyle.isScaleProteinAsCdna ();
\r
1173 Clazz.defineMethod (c$, "setScaleProteinAsCdna",
\r
1175 this.viewStyle.setScaleProteinAsCdna (b);
\r
1177 Clazz.defineMethod (c$, "isFollowHighlight",
\r
1179 return this.followHighlight;
\r
1181 Clazz.overrideMethod (c$, "setFollowHighlight",
\r
1183 this.followHighlight = b;
\r
1185 Clazz.defineMethod (c$, "getStartRes",
\r
1187 return this.startRes;
\r
1189 Clazz.overrideMethod (c$, "getEndRes",
\r
1191 return this.endRes;
\r
1193 Clazz.defineMethod (c$, "getStartSeq",
\r
1195 return this.startSeq;
\r
1197 Clazz.defineMethod (c$, "setStartRes",
\r
1199 this.startRes = res;
\r
1201 Clazz.defineMethod (c$, "setStartSeq",
\r
1203 this.startSeq = seq;
\r
1205 Clazz.defineMethod (c$, "setEndRes",
\r
1207 if (res > this.alignment.getWidth () - 1) {
\r
1208 res = this.alignment.getWidth () - 1;
\r
1211 }this.endRes = res;
\r
1213 Clazz.defineMethod (c$, "setEndSeq",
\r
1215 if (seq > this.alignment.getHeight ()) {
\r
1216 seq = this.alignment.getHeight ();
\r
1219 }this.endSeq = seq;
\r
1221 Clazz.defineMethod (c$, "getEndSeq",
\r
1223 return this.endSeq;
\r
1225 Clazz.defineMethod (c$, "findComplementScrollTarget",
\r
1227 var complement = this.getCodingComplement ();
\r
1228 if (complement == null || !complement.isFollowHighlight ()) {
\r
1230 }var iAmProtein = !this.getAlignment ().isNucleotide ();
\r
1231 var proteinAlignment = iAmProtein ? this.getAlignment () : complement.getAlignment ();
\r
1232 if (proteinAlignment == null) {
\r
1234 }var mappings = proteinAlignment.getCodonFrames ();
\r
1235 var seqOffset = 0;
\r
1236 var sequence = null;
\r
1237 var middleColumn = this.getStartRes () + Clazz.doubleToInt ((this.getEndRes () - this.getStartRes ()) / 2);
\r
1238 var hiddenSequences = this.getAlignment ().getHiddenSequences ();
\r
1239 for (var seqNo = this.getStartSeq (); seqNo < this.getEndSeq (); seqNo++, seqOffset++) {
\r
1240 sequence = this.getAlignment ().getSequenceAt (seqNo);
\r
1241 if (hiddenSequences != null && hiddenSequences.isHidden (sequence)) {
\r
1243 }if (jalview.util.Comparison.isGap (sequence.getCharAt (middleColumn))) {
\r
1245 }var seqMappings = jalview.util.MappingUtils.findMappingsForSequence (sequence, mappings);
\r
1246 if (!seqMappings.isEmpty ()) {
\r
1249 if (sequence == null) {
\r
1251 }jalview.util.MappingUtils.addSearchResults (sr, sequence, sequence.findPosition (middleColumn), mappings);
\r
1253 }, "jalview.datamodel.SearchResults");
\r