import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AlignmentView;
+import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
protected String sequenceSetID;
+ /**
+ * probably unused indicator that view is of a dataset rather than an alignment
+ */
+ protected boolean isDataset = false;
+
private Hashtable hiddenRepSequences;
protected ColumnSelection colSel = new ColumnSelection();
// --------START Structure Conservation
public void updateStrucConsensus(final AlignmentViewPanel ap)
{
+ if (autoCalculateStrucConsensus && strucConsensus==null && alignment.isNucleotide() && alignment.hasRNAStructure())
+ {
+
+ }
+
// see note in mantis : issue number 8585
if (strucConsensus == null || !autoCalculateStrucConsensus)
{
private java.beans.PropertyChangeSupport changeSupport = new java.beans.PropertyChangeSupport(
this);
+ protected boolean showConservation = true;
+
+ protected boolean showQuality = true;
+
+ protected boolean showConsensus = true;
+
/**
* Property change listener for changes in alignment
}
}
+ protected void initAutoAnnotation()
+ {
+ // TODO: add menu option action that nulls or creates consensus object
+ // depending on if the user wants to see the annotation or not in a
+ // specific alignment
+
+ if (hconsensus == null && !isDataset)
+ {
+ if (!alignment.isNucleotide())
+ {
+ if (showConservation)
+ {
+ if (conservation==null)
+ {
+ conservation = new AlignmentAnnotation("Conservation",
+ "Conservation of total alignment less than " + getConsPercGaps()
+ + "% gaps", new Annotation[1], 0f, 11f,
+ AlignmentAnnotation.BAR_GRAPH);
+ conservation.hasText = true;
+ conservation.autoCalculated = true;
+ alignment.addAnnotation(conservation);
+ }
+ }
+ if (showQuality)
+ {
+ if (quality==null)
+ {
+ quality = new AlignmentAnnotation("Quality",
+ "Alignment Quality based on Blosum62 scores",
+ new Annotation[1], 0f, 11f, AlignmentAnnotation.BAR_GRAPH);
+ quality.hasText = true;
+ quality.autoCalculated = true;
+ alignment.addAnnotation(quality);
+ }
+ }
+ } else {
+ if (alignment.hasRNAStructure())
+ {
+ strucConsensus = new AlignmentAnnotation("StrucConsensus", "PID",
+ new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
+ strucConsensus.hasText = true;
+ strucConsensus.autoCalculated = true;
+ }
+ }
+
+ consensus = new AlignmentAnnotation("Consensus", "PID",
+ new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
+ consensus.hasText = true;
+ consensus.autoCalculated = true;
+
+ if (showConsensus)
+ {
+ alignment.addAnnotation(consensus);
+ if (strucConsensus!=null)
+ {
+ alignment.addAnnotation(strucConsensus);
+ }
+ }
+ }
+ }
+
}