From eef6f42415b504bf81da34c93139fe49f560062a Mon Sep 17 00:00:00 2001 From: gmungoc Date: Thu, 21 Nov 2019 13:37:05 +0000 Subject: [PATCH] JAL-3485 constants for CDNA_CONSENSUS, STRUCTURE_CONSENSUS added --- src/jalview/renderer/AnnotationRenderer.java | 9 ++++++--- src/jalview/viewmodel/AlignmentViewport.java | 8 ++++++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index 05be67b..1e2cf76 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -365,9 +365,11 @@ public class AnnotationRenderer // if (aa.autoCalculated && (aa.label.startsWith(AutoAnnotation.CONSENSUS.label) - || aa.label.startsWith("cDNA Consensus"))) + || aa.label.startsWith( + AutoAnnotation.CDNA_CONSENSUS.label))) { - boolean forComplement = aa.label.startsWith("cDNA Consensus"); + boolean forComplement = aa.label + .startsWith(AutoAnnotation.CDNA_CONSENSUS.label); if (aa.groupRef != null && aa.groupRef.consensusData != null && aa.groupRef.isShowSequenceLogo()) { @@ -394,7 +396,8 @@ public class AnnotationRenderer } else { - if (aa.autoCalculated && aa.label.startsWith("StrucConsensus")) + if (aa.autoCalculated && aa.label + .startsWith(AutoAnnotation.STRUCTURE_CONSENSUS.label)) { // TODO implement group structure consensus /* diff --git a/src/jalview/viewmodel/AlignmentViewport.java b/src/jalview/viewmodel/AlignmentViewport.java index 01c7bb2..268633f 100644 --- a/src/jalview/viewmodel/AlignmentViewport.java +++ b/src/jalview/viewmodel/AlignmentViewport.java @@ -90,6 +90,8 @@ public abstract class AlignmentViewport CONSERVATION("Conservation", "SHOW_CONSERVATION"), QUALITY("Quality", "SHOW_QUALITY"), CONSENSUS("Consensus", "SHOW_IDENTITY"), + CDNA_CONSENSUS("cDNA Consensus", null), + STRUCTURE_CONSENSUS("StrucConsensus", null), OCCUPANCY("Occupancy", "SHOW_OCCUPANCY"); public final String label; @@ -1996,7 +1998,8 @@ public abstract class AlignmentViewport } if (doConsensus) { - complementConsensus = new AlignmentAnnotation("cDNA Consensus", + complementConsensus = new AlignmentAnnotation( + AutoAnnotation.CDNA_CONSENSUS.label, MessageManager .getString("label.complement_consensus_descr"), new Annotation[1], 0f, 100f, @@ -2075,7 +2078,8 @@ public abstract class AlignmentViewport { if (alignment.hasRNAStructure() && strucConsensus == null) { - strucConsensus = new AlignmentAnnotation("StrucConsensus", + strucConsensus = new AlignmentAnnotation( + AutoAnnotation.STRUCTURE_CONSENSUS.label, MessageManager.getString("label.strucconsensus_descr"), new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH); strucConsensus.hasText = true; -- 1.7.10.2