package jalview.schemes;
import jalview.datamodel.AlignmentAnnotation;
+import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.GraphLine;
import jalview.datamodel.SequenceCollectionI;
private boolean seqAssociated = false;
IdentityHashMap<SequenceI, AlignmentAnnotation> seqannot = null;
-
+ @Override
+ public ColourSchemeI applyTo(AnnotatedCollectionI sg,
+ Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
+ {
+ AnnotationColourGradient acg = new AnnotationColourGradient(annotation, colourScheme, aboveAnnotationThreshold);
+ acg.thresholdIsMinMax = thresholdIsMinMax;
+ acg.annotationThreshold = (annotationThreshold==null) ? null : new GraphLine(annotationThreshold);
+ acg.r1 = r1;
+ acg.g1 = g1;
+ acg.b1 = b1;
+ acg.rr = rr;
+ acg.gg = gg;
+ acg.bb = bb;
+ acg.dr = dr;
+ acg.dg = dg;
+ acg.db = db;
+ acg.predefinedColours = predefinedColours;
+ acg.seqAssociated = seqAssociated;
+
+ return acg;
+ }
/**
* Creates a new AnnotationColourGradient object.
*/
{
seqannot = new IdentityHashMap<SequenceI, AlignmentAnnotation>();
}
- for (AlignmentAnnotation alan : alignment.findAnnotation(annotation
+ // resolve the context containing all the annotation for the sequence
+ AnnotatedCollectionI alcontext = alignment instanceof AlignmentI ? alignment : alignment.getContext();
+ for (AlignmentAnnotation alan : alcontext.findAnnotation(annotation
.getCalcId()))
{
if (alan.sequenceRef != null