import jalview.datamodel.AnnotatedCollectionI
import jalview.datamodel.SequenceI
import jalview.datamodel.SequenceCollectionI
+import jalview.api.AlignViewportI
import jalview.util.Comparison
/*
/*
* to make a new instance for each alignment view
*/
- getInstance: { AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> conserved() },
+ getInstance: { AlignViewportI view, AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> conserved() },
/*
* method only needed if colour scheme has to recalculate
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceI;
import jalview.datamodel.SequenceCollectionI;
+import jalview.api.AlignViewportI
/*
* Example script that registers two new alignment colour schemes
/*
* to make a new instance for each alignment view
*/
- getInstance: { AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> candy() },
+ getInstance: { AlignViewportI view, AnnotatedCollectionI coll, Map<SequenceI, SequenceCollectionI> map -> candy() },
/*
* method only needed if colour scheme has to recalculate
import jalview.datamodel.AnnotatedCollectionI
import jalview.datamodel.SequenceI
import jalview.datamodel.SequenceCollectionI
+import jalview.api.AlignViewportI
import jalview.util.Comparison
/*
import jalview.bin.JalviewLite;
import jalview.commands.CommandI;
import jalview.datamodel.AlignmentI;
-import jalview.datamodel.Annotation;
import jalview.datamodel.ColumnSelection;
import jalview.datamodel.HiddenColumns;
import jalview.datamodel.SearchResults;
import jalview.datamodel.SearchResultsI;
-import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceGroup;
-import jalview.datamodel.SequenceI;
import jalview.renderer.ResidueShader;
import jalview.schemes.ColourSchemeProperty;
import jalview.schemes.UserColourScheme;
if (colour != null)
{
residueShading = new ResidueShader(
- ColourSchemeProperty.getColourScheme(alignment, colour));
+ ColourSchemeProperty.getColourScheme(this, alignment,
+ colour));
if (residueShading != null)
{
residueShading.setConsensus(hconsensus);
Vector<SequenceNode> l = tree.findLeaves(groups.get(i));
- Vector<SequenceI> sequences = new Vector<SequenceI>();
+ Vector<SequenceI> sequences = new Vector<>();
for (int j = 0; j < l.size(); j++)
{
SequenceI s1 = (SequenceI) l.elementAt(j).element();
}
else
{
- cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
+ cs = ColourSchemeProperty.getColourScheme(av, sg,
+ ColourSchemeProperty
.getColourName(av.getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
data.replaceAll("%20", " ");
ColourSchemeI cs = ColourSchemeProperty
- .getColourScheme(af.getViewport().getAlignment(), data);
+ .getColourScheme(af.getViewport(),
+ af.getViewport().getAlignment(), data);
if (cs != null)
{
* otherwise set the chosen colour scheme (or null for 'None')
*/
ColourSchemeI cs = ColourSchemes.getInstance().getColourScheme(name,
+ viewport,
viewport.getAlignment(), viewport.getHiddenRepSequences());
changeColour(cs);
}
ResidueColourScheme.NONE);
}
ColourSchemeI colourScheme = ColourSchemeProperty
- .getColourScheme(alignment, schemeName);
+ .getColourScheme(this, alignment, schemeName);
residueShading = new ResidueShader(colourScheme);
if (colourScheme instanceof UserColourScheme)
continue;
}
sg.setColourScheme(
- acg.getInstance(sg, ap.av.getHiddenRepSequences()));
+ acg.getInstance(av, sg, ap.av.getHiddenRepSequences()));
}
}
}
}
else
{
- cs = ColourSchemeProperty.getColourScheme(al, view.getBgColour());
+ cs = ColourSchemeProperty.getColourScheme(af.viewport, al,
+ view.getBgColour());
}
}
else
{
cs = new AnnotationColourGradient(matchedAnnotation,
- ColourSchemeProperty.getColourScheme(al,
+ ColourSchemeProperty.getColourScheme(af.viewport, al,
viewAnnColour.getColourScheme()),
viewAnnColour.getAboveThreshold());
}
}
else
{
- cs = ColourSchemeProperty.getColourScheme(al, view.getBgColour());
+ cs = ColourSchemeProperty.getColourScheme(af.viewport, al,
+ view.getBgColour());
}
// if (cs != null)
* switch to the chosen colour scheme (or null for None)
*/
ColourSchemeI colourScheme = ColourSchemes.getInstance()
- .getColourScheme(colourSchemeName, sg,
+ .getColourScheme(colourSchemeName, ap.av, sg,
ap.av.getHiddenRepSequences());
sg.setColourScheme(colourScheme);
if (colourScheme instanceof Blosum62ColourScheme
{
AlignmentI al = getAlignmentPanel().av.getAlignment();
ColourSchemeI cs = ColourSchemes.getInstance()
- .getColourScheme(colourSchemeName, al, null);
+ .getColourScheme(colourSchemeName, getAlignmentPanel().av, al,
+ null);
getBinding().setJalviewColourScheme(cs);
}
}
else
{
- cs = ColourSchemeProperty.getColourScheme(sg, ColourSchemeProperty
+ cs = ColourSchemeProperty.getColourScheme(av, sg,
+ ColourSchemeProperty
.getColourName(av.getGlobalColourScheme()));
}
// cs is null if shading is an annotationColourGradient
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
private IdentityHashMap<SequenceI, AlignmentAnnotation> seqannot = null;
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
AnnotationColourGradient acg = new AnnotationColourGradient(annotation,
}
else
{
- seqannot = new IdentityHashMap<SequenceI, AlignmentAnnotation>();
+ seqannot = new IdentityHashMap<>();
}
// resolve the context containing all the annotation for the sequence
AnnotatedCollectionI alcontext = alignment instanceof AlignmentI
package jalview.schemes;
import jalview.analysis.scoremodels.ScoreModels;
+import jalview.api.AlignViewportI;
import jalview.api.analysis.PairwiseScoreModelI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new Blosum62ColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new BuriedColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
ClustalxColourScheme css = new ClustalxColourScheme(sg,
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* new instance for each call to this method, as different instances may have
* differing shading by consensus or percentage identity applied.
*
+ * @param viewport
+ * - the parent viewport
* @param sg
+ * - the collection of sequences to be coloured
* @param hiddenRepSequences
* @return copy of current scheme with any inherited settings transferred
*/
- ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ ColourSchemeI getInstance(AlignViewportI viewport,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences);
/**
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.util.ColorUtils;
* @param name
* @return
*/
- public static ColourSchemeI getColourScheme(AnnotatedCollectionI forData,
+ public static ColourSchemeI getColourScheme(AlignViewportI view,
+ AnnotatedCollectionI forData,
String name)
{
if (ResidueColourScheme.NONE.equalsIgnoreCase(name))
* create a new instance of it
*/
ColourSchemeI scheme = ColourSchemes.getInstance().getColourScheme(name,
+ view,
forData, null);
if (scheme != null)
{
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* store in an order-preserving map, so items can be added to menus
* in the order in which they are 'discovered'
*/
- schemes = new LinkedHashMap<String, ColourSchemeI>();
+ schemes = new LinkedHashMap<>();
for (JalviewColourScheme cs : JalviewColourScheme.values())
{
{
System.err.println("Error instantiating colour scheme for "
+ cs.toString() + " " + e.getMessage());
+ e.printStackTrace();
}
}
}
*
* @param name
* name of the colour scheme
+ * @param viewport
* @param forData
* the data to be coloured
* @param optional
* @return
*/
public ColourSchemeI getColourScheme(String name,
- AnnotatedCollectionI forData,
+ AlignViewportI viewport, AnnotatedCollectionI forData,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
if (name == null)
return null;
}
ColourSchemeI cs = schemes.get(name.toLowerCase());
- return cs == null ? null : cs.getInstance(forData, hiddenRepSequences);
+ return cs == null ? null
+ : cs.getInstance(viewport, forData, hiddenRepSequences);
}
/**
public ColourSchemeI getColourScheme(String name,
AnnotatedCollectionI forData)
{
- return getColourScheme(name, forData, null);
+ return getColourScheme(name, null, forData, null);
}
/**
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
*/
public class CovariationColourScheme extends ResidueColourScheme
{
- public Map<String, Color> helixcolorhash = new Hashtable<String, Color>();
+ public Map<String, Color> helixcolorhash = new Hashtable<>();
- public Map<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+ public Map<Integer, String> positionsToHelix = new Hashtable<>();
int numHelix = 0;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new CovariationColourScheme(coll.getAlignmentAnnotation()[0]);
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new FollowerColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new HelixColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new HydrophobicColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new NucleotideColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceGroup;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new PIDColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new PurinePyrimidineColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
* Maps sequence positions to the RNA helix they belong to. Key: position,
* Value: helix TODO: Revise or drop in favour of annotation position numbers
*/
- public Hashtable<Integer, String> positionsToHelix = new Hashtable<Integer, String>();
+ public Hashtable<Integer, String> positionsToHelix = new Hashtable<>();
/**
* Number of helices in the RNA secondary structure
annotation.getRNAStruc();
lastrefresh = annotation._rnasecstr.hashCode();
numHelix = 0;
- positionsToHelix = new Hashtable<Integer, String>();
+ positionsToHelix = new Hashtable<>();
// Figure out number of helices
// Length of rnasecstr is the number of pairs of positions that base pair
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
return new RNAHelicesColour(sg);
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new RNAInteractionColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new ScoreColourScheme(symbolIndex, scores, min, max);
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new StrandColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.AnnotatedCollectionI;
// assume only one set of TCOFFEE scores - but could have more than one
// potentially.
- List<AlignmentAnnotation> annots = new ArrayList<AlignmentAnnotation>();
+ List<AlignmentAnnotation> annots = new ArrayList<>();
// Search alignment to get all tcoffee annotation and pick one set of
// annotation to use to colour seqs.
- seqMap = new IdentityHashMap<SequenceI, Color[]>();
+ seqMap = new IdentityHashMap<>();
AnnotatedCollectionI alcontext = alignment instanceof AlignmentI
? alignment
: alignment.getContext();
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
return new TCoffeeColourScheme(sg);
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new TaylorColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new TurnColourScheme();
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
return new UserColourScheme(this);
*/
package jalview.schemes;
+import jalview.api.AlignViewportI;
import jalview.datamodel.AnnotatedCollectionI;
import jalview.datamodel.SequenceCollectionI;
import jalview.datamodel.SequenceI;
* be coloured
*/
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI coll,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI coll,
Map<SequenceI, SequenceCollectionI> hrs)
{
return new ZappoColourScheme();
af.loadJalviewDataFile(inAnnot, DataSourceType.FILE, null, null);
assertSame(af.getViewport().getGlobalColourScheme().getClass(),
TCoffeeColourScheme.class, "Didn't set T-coffee colourscheme");
- assertNotNull(ColourSchemeProperty.getColourScheme(af.getViewport()
+ assertNotNull(
+ ColourSchemeProperty.getColourScheme(af.getViewport(),
+ af.getViewport()
.getAlignment(), af.getViewport().getGlobalColourScheme()
.getSchemeName()), "Recognise T-Coffee score from string");
{
AnnotationColourGradient testee = new AnnotationColourGradient(ann,
minColour, maxColour, AnnotationColourGradient.ABOVE_THRESHOLD);
- testee = (AnnotationColourGradient) testee.getInstance(al, null);
+ testee = (AnnotationColourGradient) testee.getInstance(null, al, null);
for (int col = 0; col < WIDTH; col++)
{
{
AnnotationColourGradient testee = new AnnotationColourGradient(ann,
minColour, maxColour, AnnotationColourGradient.BELOW_THRESHOLD);
- testee = (AnnotationColourGradient) testee.getInstance(al, null);
+ testee = (AnnotationColourGradient) testee.getInstance(null, al, null);
for (int col = 0; col < WIDTH; col++)
{
{
AnnotationColourGradient testee = new AnnotationColourGradient(ann,
minColour, maxColour, AnnotationColourGradient.NO_THRESHOLD);
- testee = (AnnotationColourGradient) testee.getInstance(al, null);
+ testee = (AnnotationColourGradient) testee.getInstance(null, al, null);
for (int col = 0; col < WIDTH; col++)
{
{
AnnotationColourGradient testee = new AnnotationColourGradient(ann,
minColour, maxColour, AnnotationColourGradient.NO_THRESHOLD);
- testee = (AnnotationColourGradient) testee.getInstance(al, null);
+ testee = (AnnotationColourGradient) testee.getInstance(null, al, null);
/*
* flag corresponding to 'use original colours' checkbox
SequenceI seq = new Sequence("Seq1", "abcd");
AlignmentI al = new Alignment(new SequenceI[] { seq });
// the strings here correspond to JalviewColourScheme.toString() values
- ColourSchemeI cs = ColourSchemeProperty.getColourScheme(al, "Clustal");
+ ColourSchemeI cs = ColourSchemeProperty.getColourScheme(null, al,
+ "Clustal");
assertTrue(cs instanceof ClustalxColourScheme);
// not case-sensitive
- cs = ColourSchemeProperty.getColourScheme(al, "CLUSTAL");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "CLUSTAL");
assertTrue(cs instanceof ClustalxColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "clustal");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "clustal");
assertTrue(cs instanceof ClustalxColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Blosum62");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Blosum62");
assertTrue(cs instanceof Blosum62ColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "% Identity");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "% Identity");
assertTrue(cs instanceof PIDColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Zappo");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Zappo");
assertTrue(cs instanceof ZappoColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Taylor");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Taylor");
assertTrue(cs instanceof TaylorColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Hydrophobic");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Hydrophobic");
assertTrue(cs instanceof HydrophobicColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Helix Propensity");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Helix Propensity");
assertTrue(cs instanceof HelixColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Strand Propensity");
+ cs = ColourSchemeProperty.getColourScheme(null, al,
+ "Strand Propensity");
assertTrue(cs instanceof StrandColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Turn Propensity");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Turn Propensity");
assertTrue(cs instanceof TurnColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Buried Index");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Buried Index");
assertTrue(cs instanceof BuriedColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Nucleotide");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "Nucleotide");
assertTrue(cs instanceof NucleotideColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "Purine/Pyrimidine");
+ cs = ColourSchemeProperty.getColourScheme(null, al,
+ "Purine/Pyrimidine");
assertTrue(cs instanceof PurinePyrimidineColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "T-Coffee Scores");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "T-Coffee Scores");
assertTrue(cs instanceof TCoffeeColourScheme);
- cs = ColourSchemeProperty.getColourScheme(al, "RNA Helices");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "RNA Helices");
assertTrue(cs instanceof RNAHelicesColour);
// 'None' is a special value
- assertNull(ColourSchemeProperty.getColourScheme(al, "None"));
- assertNull(ColourSchemeProperty.getColourScheme(al, "none"));
+ assertNull(ColourSchemeProperty.getColourScheme(null, al, "None"));
+ assertNull(ColourSchemeProperty.getColourScheme(null, al, "none"));
// default is to convert the name into a fixed colour
- cs = ColourSchemeProperty.getColourScheme(al, "elephants");
+ cs = ColourSchemeProperty.getColourScheme(null, al, "elephants");
assertTrue(cs instanceof UserColourScheme);
/*
* explicit aa colours
*/
UserColourScheme ucs = (UserColourScheme) ColourSchemeProperty
- .getColourScheme(al,
+ .getColourScheme(null, al,
"R,G=red;C=blue;c=green;Q=10,20,30;S,T=11ffdd");
assertEquals(ucs.findColour('H'), Color.white);
assertEquals(ucs.findColour('R'), Color.red);
import static org.testng.Assert.assertSame;
import static org.testng.Assert.assertTrue;
+import jalview.api.AlignViewportI;
import jalview.bin.Cache;
import jalview.bin.Jalview;
import jalview.datamodel.AnnotatedCollectionI;
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
final ColourSchemeI cs1 = ColourSchemes.getInstance()
}
@Override
- public ColourSchemeI getInstance(AnnotatedCollectionI sg,
+ public ColourSchemeI getInstance(AlignViewportI view,
+ AnnotatedCollectionI sg,
Map<SequenceI, SequenceCollectionI> hiddenRepSequences)
{
return new MyClustal(sg, hiddenRepSequences);