From: Renia Correya Date: Thu, 4 Jul 2024 09:30:25 +0000 (+0100) Subject: JAL-4392 Updated the colouring of consensus logo X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=a8367f07f487bcf754bd249b5f90889f7f630aa4;p=jalview.git JAL-4392 Updated the colouring of consensus logo --- diff --git a/src/jalview/analysis/AlignmentUtils.java b/src/jalview/analysis/AlignmentUtils.java index 0284498..99d3d6e 100644 --- a/src/jalview/analysis/AlignmentUtils.java +++ b/src/jalview/analysis/AlignmentUtils.java @@ -2914,7 +2914,7 @@ public class AlignmentUtils return Color.red; } - return Color.gray; + return Color.white; } public static char findSSAnnotationForGivenSeqposition(AlignmentAnnotation aa, diff --git a/src/jalview/renderer/AnnotationRenderer.java b/src/jalview/renderer/AnnotationRenderer.java index f46019e..3235624 100644 --- a/src/jalview/renderer/AnnotationRenderer.java +++ b/src/jalview/renderer/AnnotationRenderer.java @@ -1641,7 +1641,7 @@ public class AnnotationRenderer column, null); } if(_aa.label.startsWith(Constants.SECONDARY_STRUCTURE_CONSENSUS_LABEL)) { - colour = AlignmentUtils.getSecondaryStructureAnnotationColour(dc[0]); + colour = profcolour.findSSColour(dc[0], column); } else { diff --git a/src/jalview/renderer/ResidueShader.java b/src/jalview/renderer/ResidueShader.java index 00c228f..0b191ec 100644 --- a/src/jalview/renderer/ResidueShader.java +++ b/src/jalview/renderer/ResidueShader.java @@ -20,6 +20,7 @@ */ package jalview.renderer; +import jalview.analysis.AlignmentUtils; import jalview.analysis.Conservation; import jalview.api.ViewStyleI; import jalview.datamodel.AnnotatedCollectionI; @@ -304,24 +305,15 @@ public class ResidueShader implements ResidueShaderI } @Override - public Color findSSColour(char symbol, int position, SequenceI seq, String source) + public Color findSSColour(char symbol, int position) { if (colourScheme == null) { return Color.white; // Colour is 'None' } - /* - * get 'base' colour - */ - ProfileI profile = ssConsensusProfileMap.get(source) == null ? null : ssConsensusProfileMap.get(source).get(position); - String modalSS = profile == null ? null - : profile.getModalSS(); - float pid = profile == null ? 0f - : profile.getSSPercentageIdentity(ignoreGaps); - Color colour = colourScheme.findColour(symbol, position, seq, - modalSS, pid); - + Color colour = AlignmentUtils.getSecondaryStructureAnnotationColour(symbol); + /* * apply PID threshold and consensus fading if in force */ diff --git a/src/jalview/renderer/ResidueShaderI.java b/src/jalview/renderer/ResidueShaderI.java index 38a466b..c35f208 100644 --- a/src/jalview/renderer/ResidueShaderI.java +++ b/src/jalview/renderer/ResidueShaderI.java @@ -84,8 +84,7 @@ public interface ResidueShaderI public abstract void setColourScheme(ColourSchemeI cs); - Color findSSColour(char symbol, int position, SequenceI seq, - String source); + Color findSSColour(char symbol, int position); int getConsensusSecondaryStructureThreshold();