JAL-902 structure conservation row for applet
authorjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:55:01 +0000 (15:55 +0100)
committerjprocter <jprocter@compbio.dundee.ac.uk>
Fri, 28 Oct 2011 14:55:01 +0000 (15:55 +0100)
src/jalview/appletgui/AlignViewport.java

index ab9a25d..95aafab 100644 (file)
@@ -280,6 +280,14 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
 
           alignment.addAnnotation(quality);
         }
+      } else {
+        if (alignment.hasRNAStructure())
+        {
+          strucConsensus = new AlignmentAnnotation("StrucConsensus", "PID",
+                  new Annotation[1], 0f, 100f, AlignmentAnnotation.BAR_GRAPH);
+          strucConsensus.hasText = true;
+          strucConsensus.autoCalculated = true;
+        }
       }
 
       consensus = new AlignmentAnnotation("Consensus", "PID",
@@ -290,6 +298,10 @@ public class AlignViewport extends AlignmentViewport implements AlignViewportI,
       if (showConsensus)
       {
         alignment.addAnnotation(consensus);
+        if (strucConsensus!=null)
+        {
+          alignment.addAnnotation(strucConsensus);
+        }
       }
     }