JAL-1239 cancelled flag should be checked and counted
[jalview.git] / src / jalview / schemes / TCoffeeColourScheme.java
index 6eb48c2..1c8e469 100644 (file)
@@ -85,8 +85,9 @@ public class TCoffeeColourScheme extends ResidueColourScheme
     // Search alignment to get all tcoffee annotation and pick one set of
     // annotation to use to colour seqs.
     seqMap = new IdentityHashMap<SequenceI, Color[]>();
+    AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment : alignment.getContext();
     int w = 0;
-    for (AlignmentAnnotation al : alignment
+    for (AlignmentAnnotation al : alcontext
             .findAnnotation(TCoffeeScoreFile.TCOFFEE_SCORE))
     {
       if (al.sequenceRef != null && !al.belowAlignment)
@@ -129,4 +130,11 @@ public class TCoffeeColourScheme extends ResidueColourScheme
     }
     return cols[j];
   }
+  
+  @Override
+  public ColourSchemeI applyTo(AnnotatedCollectionI sg,
+          Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+  {
+    return new TCoffeeColourScheme(sg);
+  }
 }