*/
package jalview.schemes;
+import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
super();
}
+ /**
+ * Returns a new instance of this colour scheme with which the given data may
+ * be coloured
+ */
+ @Override
+ public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ Map<SequenceI, SequenceCollectionI> hrs)
+ {
+ return new Blosum62ColourScheme();
+ }
+
@Override
public Color findColour(char res, int j, SequenceI seq)
{
}
@Override
- public ColourSchemeI applyTo(AnnotatedCollectionI sg,
- Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
- {
- ColourSchemeI newcs = super.applyTo(sg, hiddenRepSequences);
- return newcs;
- }
-
- @Override
public boolean isPeptideSpecific()
{
return true;
{
return JalviewColourScheme.Blosum62.toString();
}
+
+ /**
+ * Answers true if Conservation annotation is present, else false
+ */
+ @Override
+ public boolean isApplicableTo(AnnotatedCollectionI ac)
+ {
+ AlignmentAnnotation[] anns = ac.getAlignmentAnnotation();
+ if (anns == null)
+ {
+ return false;
+ }
+ for (AlignmentAnnotation ann : anns)
+ {
+ if ("Conservation".equals(ann.label))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
}