patch for JAL-795 - use base secondary structure colour if no colour defined on annot...
authorJim Procter <jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:26:11 +0000 (15:26 +0000)
committerJim Procter <jprocter@dundee.ac.uk>
Thu, 30 Oct 2014 15:26:11 +0000 (15:26 +0000)
src/jalview/schemes/AnnotationColourGradient.java

index e975884..3bca94b 100755 (executable)
@@ -244,7 +244,10 @@ public class AnnotationColourGradient extends FollowerColourScheme
         {
           if (predefinedColours)
           {
-            return currentColour;
+            return (annotation.annotations[j].secondaryStructure == 'H' ? jalview.renderer.AnnotationRenderer.HELIX_COLOUR
+                    : annotation.annotations[j].secondaryStructure == 'E' ? jalview.renderer.AnnotationRenderer.SHEET_COLOUR
+                            : annotation.annotations[j].secondaryStructure != ' ' ? jalview.renderer.AnnotationRenderer.STEM_COLOUR
+                                    : currentColour);
           }
         }
         if (aboveAnnotationThreshold == NO_THRESHOLD