X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Frenderer%2FAnnotationRenderer.java;h=09152d69662e720be130742507c141dea6f4fdd3;hb=3b4eda86f1f240a932cc778658dc1fbe56e9630d;hp=f492d9c8f3c9d773b2716a51bd5b43b80571a71d;hpb=82a1660cd4ac60d30f947e2c57c66f7fb2a40996;p=jalview.git diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index f492d9c..09152d6 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -240,7 +240,7 @@ public class AnnotationRenderer } // TODO extend annotation row to enable dynamic and static profile data to // be stored - if (aa.groupRef == null && aa.sequenceRef == null && av_renderProfile) + if (aa.groupRef == null && aa.sequenceRef == null) { return AAFrequency.extractProfile(hconsensus[column], av_ignoreGapsConsensus); @@ -262,7 +262,7 @@ public class AnnotationRenderer // to // be stored if (aa.groupRef == null && aa.sequenceRef == null - && av_renderProfile && hStrucConsensus != null + && hStrucConsensus != null && hStrucConsensus.length > column) { return StructureFrequency.extractProfile(hStrucConsensus[column], @@ -318,7 +318,7 @@ public class AnnotationRenderer boolean centreColLabels, centreColLabelsDef = av .getCentreColumnLabels(); boolean scaleColLabel = false; - AlignmentAnnotation consensusAnnot=av.getAlignmentConsensusAnnotation(); + AlignmentAnnotation consensusAnnot=av.getAlignmentConsensusAnnotation(),structConsensusAnnot=av.getAlignmentStrucConsensusAnnotation(); boolean renderHistogram = true, renderProfile = true, normaliseProfile = false; BitSet graphGroupDrawn = new BitSet(); @@ -333,6 +333,26 @@ public class AnnotationRenderer for (int i = 0; i < aa.length; i++) { AlignmentAnnotation row = aa[i]; + { + // check if this is a consensus annotation row and set the display settings appropriately + // TODO: generalise this to have render styles for consensus/profile + // data + if (row.groupRef != null && row == row.groupRef.getConsensus()) + { + renderHistogram = row.groupRef.isShowConsensusHistogram(); + renderProfile = row.groupRef.isShowSequenceLogo(); + normaliseProfile = row.groupRef.isNormaliseSequenceLogo(); + } + else if (row == consensusAnnot || row == structConsensusAnnot) + { + renderHistogram = av_renderHistogram; + renderProfile = av_renderProfile; + normaliseProfile = av_normaliseProfile; + } else { + renderHistogram = true; + // don't need to set render/normaliseProfile since they are not currently used in any other annotation track renderer + } + } Annotation[] row_annotations = row.annotations; if (!row.visible) {