+ consensus = new AlignmentAnnotation("","",
+ new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
+ consensus.hasText = true;
+ consensus.autoCalculated = true;
+ consensus.groupRef = this;
+ }
+ consensus.label = "Consensus for "+getName();
+ consensus.description = "Percent Identity";
+ return consensus;
+ }
+ /**
+ * get the conservation annotation row for this group
+ * @return autoCalculated annotation row
+ */
+ public AlignmentAnnotation getConservationRow() {
+ if (conservation == null) {
+ conservation = new AlignmentAnnotation("","", new Annotation[1], 0f, 11f,
+ AlignmentAnnotation.BAR_GRAPH);
+ conservation.hasText = true;
+ conservation.autoCalculated = true;
+ conservation.groupRef = this;
+ }
+ conservation.label = "Conservation for "+getName();
+ conservation.description = "Conservation for group "+getName()+" less than " + consPercGaps
+ + "% gaps";
+ return conservation;
+ }
+
+ /**
+ *
+ * @return true if annotation rows have been instantiated for this group
+ */
+ public boolean hasAnnotationRows()
+ {
+ return consensus!=null || conservation!=null;
+ }
+
+ public SequenceI getConsensusSeq()
+ {
+ getConsensus();
+ StringBuffer seqs = new StringBuffer();
+ for (int i = 0; i < consensus.annotations.length; i++)
+ {
+ if (consensus.annotations[i] != null)