import jalview.schemes.ResidueColourScheme;
import jalview.schemes.ColourSchemes;
import jalview.datamodel.AnnotatedCollectionI;
-import java.util.Map;
import jalview.datamodel.SequenceI;
/*
Stripy() { }
String getSchemeName() { "stripy" }
Stripy getInstance(AnnotatedCollectionI coll, Map map) { new Stripy() }
- Color findColour(char res, int col, SequenceI seq) {
- // determine the colour
- Color colour = findColour(res, col)
- // let Jalview apply conservation or consensus shading
- adjustColour(res, col, colour);
- }
- Color findColour(char res, int col) {
+ Color findColour(char res, int col, SequenceI seq)
+ {
if (res == ' ' || res == '-' || res == '.')
{
Color.yellow
boolean isPeptideSpecific() {true}
String getSchemeName() { "By Weight" }
ByWeight getInstance(AnnotatedCollectionI coll, Map map) { new ByWeight() }
- Color makeColour(int weight) {
+ Color makeColour(int weight)
+ {
int i = 255 * (weight - min) / (max - min);
new Color(i, 0, i);
}
- Color findColour(char res, int col, SequenceI seq) {
- // determine the colour
- Color colour = findColour(res, col)
- // let Jalview apply any conservation or consensus shading
- adjustColour(res, col, colour);
- }
- Color findColour(char res, int col) {
+ Color findColour(char res, int col, SequenceI seq)
+ {
switch (res) {
case ' ':
case '-':