AlignmentAnnotation conservation;
AlignmentAnnotation quality;
+ AlignmentAnnotation[] groupConsensus;
+ AlignmentAnnotation[] groupConservation;
boolean autocalculateConsensus = true;
hconsensus = new Hashtable[aWidth];
AAFrequency.calculate(alignment.getSequencesArray(), 0, alignment
- .getWidth(), hconsensus);
-
- for (int i = 0; i < aWidth; i++)
- {
- float value = 0;
- if (ignoreGapsInConsensusCalculation)
- {
- value = ((Float) hconsensus[i].get(AAFrequency.PID_NOGAPS))
- .floatValue();
- }
- else
- {
- value = ((Float) hconsensus[i].get(AAFrequency.PID_GAPS))
- .floatValue();
- }
-
- String maxRes = hconsensus[i].get(AAFrequency.MAXRESIDUE)
- .toString();
- String mouseOver = hconsensus[i].get(AAFrequency.MAXRESIDUE)
- + " ";
-
- if (maxRes.length() > 1)
- {
- mouseOver = "[" + maxRes + "] ";
- maxRes = "+";
- }
-
- mouseOver += ((int) value + "%");
- consensus.annotations[i] = new Annotation(maxRes, mouseOver, ' ',
- value);
- }
-
+ .getWidth(), hconsensus, includeAllConsensusSymbols);
+ AAFrequency.completeConsensus(consensus,hconsensus,0,aWidth,ignoreGapsInConsensusCalculation, includeAllConsensusSymbols);
+
if (globalColourScheme != null)
{
globalColourScheme.setConsensus(hconsensus);
*
* @return consensus sequence as a new sequence object
*/
- /**
- * get the consensus sequence as displayed under the PID consensus annotation
- * row.
- *
- * @return consensus sequence as a new sequence object
- */
public SequenceI getConsensusSeq()
{
if (consensus == null)
{
this.showUnconserved = displayNonconserved;
}
+
+ /**
+ * consensus annotation includes all percentage for all symbols in column
+ * DISABLED FOR 2.5 RELEASE (bug #60064 logo rendering is not AWT 1.1 compatible)
+ */
+ private boolean includeAllConsensusSymbols=false;
+
+ /**
+ * should conservation rows be shown for groups
+ * DISABLED FOR 2.5 RELEASE (bug 62446)
+ */
+ boolean showGroupConservation = false;
+ /**
+ * should consensus rows be shown for groups
+ * DISABLED FOR 2.5 RELEASE (bug 62446)
+ */
+ boolean showGroupConsensus = false;
+ /**
+ * should consensus profile be rendered by default
+ * DISABLED FOR 2.5 RELEASE (bug #60064 logo rendering is not AWT 1.1 compatible)
+ */
+ public boolean showSequenceLogo = false;
+ /**
+ * should consensus histograms be rendered by default
+ */
+ public boolean showConsensusHistogram = true;
+ /**
+ * @return the showConsensusProfile
+ */
+ public boolean isShowSequenceLogo()
+ {
+ return showSequenceLogo;
+ }
+ /**
+ * @param showSequenceLogo the new value
+ public void setShowSequenceLogo(boolean showSequenceLogo)
+ {
+ this.showSequenceLogo = showSequenceLogo;
+ }
+ */
+ /**
+ * @param showGroupConsensus the showGroupConsensus to set
+ */
+ public void setShowGroupConsensus(boolean showGroupConsensus)
+ {
+ this.showGroupConsensus = showGroupConsensus;
+ }
+ /**
+ * @return the includeAllConsensusSymbols
+ */
+ public boolean isIncludeAllConsensusSymbols()
+ {
+ return false;
+ }
+
+ /**
+ *
+ * @return flag to indicate if the consensus histogram should be rendered by default
+ */
+ public boolean isShowConsensusHistogram()
+ {
+ return this.showConsensusHistogram;
+ }
}