6 import jalview.analysis.Conservation;
7 import jalview.datamodel.Annotation;
11 class ConservationThread extends Thread
16 private AlignViewport alignViewport;
19 public ConservationThread(AlignViewport alignViewport, AlignmentPanel ap)
21 this.alignViewport = alignViewport;
29 this.alignViewport.updatingConservation = true;
31 while (AlignViewport.UPDATING_CONSERVATION)
37 ap.paintAlignment(false);
40 } catch (Exception ex)
46 AlignViewport.UPDATING_CONSERVATION = true;
48 int alWidth = this.alignViewport.alignment.getWidth();
54 Conservation cons = new jalview.analysis.Conservation("All",
55 jalview.schemes.ResidueProperties.propHash, 3, this.alignViewport.alignment
56 .getSequences(), 0, alWidth - 1);
59 cons.verdict(false, this.alignViewport.ConsPercGaps);
61 if (this.alignViewport.quality != null)
65 cons.completeAnnotations(alignViewport.conservation,alignViewport.quality, alWidth);
66 } catch (OutOfMemoryError error)
68 new OOMWarning("calculating conservation", error);
70 this.alignViewport.conservation = null;
71 this.alignViewport.quality = null;
75 AlignViewport.UPDATING_CONSERVATION = false;
76 this.alignViewport.updatingConservation = false;
80 ap.paintAlignment(true);