Clover icon

Coverage Report

  1. Project Clover database Tue Mar 10 2026 14:58:44 GMT
  2. Package jalview.renderer.seqfeatures

File FeatureColourFinderTest.java

 

Code metrics

0
221
18
1
599
352
18
0.08
12.28
18
1

Classes

Class Line # Actions
FeatureColourFinderTest 65 221 18
0.00%
 

Contributing tests

No tests hitting this source file were found.

Source view

1    /*
2    * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3    * Copyright (C) $$Year-Rel$$ The Jalview Authors
4    *
5    * This file is part of Jalview.
6    *
7    * Jalview is free software: you can redistribute it and/or
8    * modify it under the terms of the GNU General Public License
9    * as published by the Free Software Foundation, either version 3
10    * of the License, or (at your option) any later version.
11    *
12    * Jalview is distributed in the hope that it will be useful, but
13    * WITHOUT ANY WARRANTY; without even the implied warranty
14    * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15    * PURPOSE. See the GNU General Public License for more details.
16    *
17    * You should have received a copy of the GNU General Public License
18    * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19    * The Jalview Authors are detailed in the 'AUTHORS' file.
20    */
21    package jalview.renderer.seqfeatures;
22   
23    import static org.testng.Assert.assertEquals;
24    import static org.testng.Assert.assertFalse;
25    import static org.testng.Assert.assertNotEquals;
26    import static org.testng.Assert.assertNull;
27    import static org.testng.Assert.assertTrue;
28    import java.awt.Color;
29    import java.util.List;
30   
31    import org.testng.annotations.BeforeClass;
32    import org.testng.annotations.BeforeMethod;
33    import org.testng.annotations.BeforeTest;
34    import org.testng.annotations.Test;
35   
36    import jalview.api.FeatureColourI;
37    import jalview.datamodel.SequenceFeature;
38    import jalview.datamodel.SequenceI;
39    import jalview.gui.AlignFrame;
40    import jalview.api.AlignViewportI;
41    import jalview.io.DataSourceType;
42    import jalview.io.FileLoader;
43    import jalview.schemes.FeatureColour;
44    import jalview.viewmodel.seqfeatures.FeatureRendererModel;
45    import jalview.viewmodel.seqfeatures.FeatureRendererModel.FeatureSettingsBean;
46   
47   
48    /**
49    * Unit tests for feature colour determination, including but not limited to
50    * <ul>
51    * <li>gap position</li>
52    * <li>no features present</li>
53    * <li>features present but show features turned off</li>
54    * <li>features displayed but selected feature turned off</li>
55    * <li>features displayed but feature group turned off</li>
56    * <li>feature displayed but none at the specified position</li>
57    * <li>multiple features at position, with no transparency</li>
58    * <li>multiple features at position, with transparency</li>
59    * <li>score graduated feature colour</li>
60    * <li>contact feature start at the selected position</li>
61    * <li>contact feature end at the selected position</li>
62    * <li>contact feature straddling the selected position (not shown)</li>
63    * </ul>
64    */
 
65    public class FeatureColourFinderTest
66    {
67    private AlignViewportI av;
68   
69    private SequenceI seq;
70   
71    private FeatureColourFinder finder;
72   
73    private AlignFrame af;
74   
75    private FeatureRendererModel fr;
76   
 
77  0 toggle @BeforeClass(alwaysRun = true)
78    public void setUp()
79    {
80    // aligned column 8 is sequence position 6
81  0 String s = ">s1\nABCDE---FGHIJKLMNOPQRSTUVWXYZ\n";
82  0 af = new FileLoader().LoadFileWaitTillLoaded(s,
83    DataSourceType.PASTE);
84  0 av = af.getViewport();
85  0 seq = av.getAlignment().getSequenceAt(0);
86  0 fr = af.getFeatureRenderer();
87  0 finder = new FeatureColourFinder(fr);
88    }
89   
90    /**
91    * Clear down any sequence features before each test (not as easy as it
92    * sounds...)
93    */
 
94  0 toggle @BeforeMethod(alwaysRun = true)
95    public void setUpBeforeTest()
96    {
97  0 List<SequenceFeature> sfs = seq.getSequenceFeatures();
98  0 for (SequenceFeature sf : sfs)
99    {
100  0 seq.deleteFeature(sf);
101    }
102  0 fr.findAllFeatures(true);
103   
104    /*
105    * reset all feature groups to visible
106    */
107  0 for (String group : fr.getGroups(false))
108    {
109  0 fr.setGroupVisibility(group, true);
110    }
111   
112  0 fr.clearRenderOrder();
113  0 av.setShowSequenceFeatures(true);
114    }
115   
 
116  0 toggle @Test(groups = "Functional")
117    public void testFindFeatureColour_noFeatures()
118    {
119  0 av.setShowSequenceFeatures(false);
120  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
121  0 assertEquals(c, Color.blue);
122   
123  0 av.setShowSequenceFeatures(true);
124  0 c = finder.findFeatureColour(Color.blue, seq, 10);
125  0 assertEquals(c, Color.blue);
126    }
127   
 
128  0 toggle @Test(groups = "Functional")
129    public void testFindFeatureColour_noFeaturesShown()
130    {
131  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
132    Float.NaN, "MetalGroup"));
133  0 fr.featuresAdded();
134  0 av.setShowSequenceFeatures(false);
135  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
136  0 assertEquals(c, Color.blue);
137    }
138   
 
139  0 toggle @Test(groups = "Functional")
140    public void testFindFeatureColour_singleFeatureAtPosition()
141    {
142  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
143    Float.NaN, "MetalGroup"));
144  0 fr.setColour("Metal", new FeatureColour(Color.red));
145  0 fr.featuresAdded();
146  0 av.setShowSequenceFeatures(true);
147  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
148  0 assertEquals(c, Color.red);
149    }
150   
151    /**
152    * feature colour at a gap is null (not white) - a user defined colour scheme
153    * can then provide a bespoke gap colour if configured to do so
154    */
 
155  0 toggle @Test(groups = "Functional")
156    public void testFindFeatureColour_gapPosition()
157    {
158  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12, 0f,
159    null));
160  0 fr.setColour("Metal", new FeatureColour(Color.red));
161  0 fr.featuresAdded();
162  0 av.setShowSequenceFeatures(true);
163  0 Color c = finder.findFeatureColour(null, seq, 6);
164  0 assertNull(c);
165    }
166   
167    /**
168    * Nested features coloured by label - expect the colour of the enclosed
169    * feature
170    */
 
171  0 toggle @Test(groups = "Functional")
172    public void testFindFeatureColour_nestedFeatures()
173    {
174  0 SequenceFeature sf1 = new SequenceFeature("domain", "peptide", 1, 120,
175    0f, null);
176  0 seq.addSequenceFeature(sf1);
177  0 SequenceFeature sf2 = new SequenceFeature("domain", "binding", 10, 20,
178    0f, null);
179  0 seq.addSequenceFeature(sf2);
180  0 FeatureColourI fc = new FeatureColour(Color.red);
181  0 fc.setColourByLabel(true);
182  0 fr.setColour("domain", fc);
183  0 fr.featuresAdded();
184  0 av.setShowSequenceFeatures(true);
185  0 Color c = finder.findFeatureColour(null, seq, 15);
186  0 assertEquals(c, fr.getColor(sf2, fc));
187    }
 
188  0 toggle @Test(groups = "Functional")
189    public void testFindFeatureColour_multipleFeaturesAtPositionNoTransparency()
190    {
191    /*
192    * featuresAdded -> FeatureRendererModel.updateRenderOrder which adds any
193    * new features 'on top' (but reverses the order of any added features)
194    */
195  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
196    Float.NaN, "MetalGroup"));
197  0 FeatureColour red = new FeatureColour(Color.red);
198  0 fr.setColour("Metal", red);
199  0 fr.featuresAdded();
200  0 seq.addSequenceFeature(new SequenceFeature("Domain", "Domain", 4, 15,
201    Float.NaN, "DomainGroup"));
202  0 FeatureColour green = new FeatureColour(Color.green);
203  0 fr.setColour("Domain", green);
204  0 fr.featuresAdded();
205  0 av.setShowSequenceFeatures(true);
206   
207    /*
208    * expect Domain (green) to be rendered above Metal (red)
209    */
210  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
211  0 assertEquals(c, Color.green);
212   
213    /*
214    * now promote Metal above Domain
215    * - currently no way other than mimicking reordering of
216    * table in Feature Settings
217    */
218  0 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
219  0 data[0] = new FeatureSettingsBean("Metal", red, null, true);
220  0 data[1] = new FeatureSettingsBean("Domain", green, null, true);
221  0 fr.setFeaturePriority(data);
222  0 c = finder.findFeatureColour(Color.blue, seq, 10);
223  0 assertEquals(c, Color.red);
224   
225    /*
226    * ..and turn off display of Metal
227    */
228  0 data[0] = new FeatureSettingsBean("Metal", red, null, false);
229  0 fr.setFeaturePriority(data);
230  0 c = finder.findFeatureColour(Color.blue, seq, 10);
231  0 assertEquals(c, Color.green);
232    }
233   
 
234  0 toggle @Test(groups = "Functional")
235    public void testFindFeatureColour_singleFeatureNotAtPosition()
236    {
237  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 8, 12,
238    Float.NaN, "MetalGroup"));
239  0 fr.setColour("Metal", new FeatureColour(Color.red));
240  0 fr.featuresAdded();
241  0 av.setShowSequenceFeatures(true);
242    // column 2 = sequence position 3
243  0 Color c = finder.findFeatureColour(Color.blue, seq, 2);
244  0 assertEquals(c, Color.blue);
245    }
246   
 
247  0 toggle @Test(groups = "Functional")
248    public void testFindFeatureColour_featureTypeNotDisplayed()
249    {
250  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
251    Float.NaN, "MetalGroup"));
252  0 FeatureColour red = new FeatureColour(Color.red);
253  0 fr.setColour("Metal", red);
254  0 fr.featuresAdded();
255  0 av.setShowSequenceFeatures(true);
256  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
257  0 assertEquals(c, Color.red);
258   
259    /*
260    * turn off display of Metal - is this the easiest way to do it??
261    */
262  0 FeatureSettingsBean[] data = new FeatureSettingsBean[1];
263  0 data[0] = new FeatureSettingsBean("Metal", red, null, false);
264  0 fr.setFeaturePriority(data);
265  0 c = finder.findFeatureColour(Color.blue, seq, 10);
266  0 assertEquals(c, Color.blue);
267   
268    /*
269    * turn display of Metal back on
270    */
271  0 data[0] = new FeatureSettingsBean("Metal", red, null, true);
272  0 fr.setFeaturePriority(data);
273  0 c = finder.findFeatureColour(Color.blue, seq, 10);
274  0 assertEquals(c, Color.red);
275    }
276   
 
277  0 toggle @Test(groups = "Functional")
278    public void testFindFeatureColour_featureGroupNotDisplayed()
279    {
280  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
281    Float.NaN, "MetalGroup"));
282  0 FeatureColour red = new FeatureColour(Color.red);
283  0 fr.setColour("Metal", red);
284  0 fr.featuresAdded();
285  0 av.setShowSequenceFeatures(true);
286  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
287  0 assertEquals(c, Color.red);
288   
289    /*
290    * turn off display of MetalGroup
291    */
292  0 fr.setGroupVisibility("MetalGroup", false);
293  0 c = finder.findFeatureColour(Color.blue, seq, 10);
294  0 assertEquals(c, Color.blue);
295   
296    /*
297    * turn display of MetalGroup back on
298    */
299  0 fr.setGroupVisibility("MetalGroup", true);
300  0 c = finder.findFeatureColour(Color.blue, seq, 10);
301  0 assertEquals(c, Color.red);
302    }
303   
 
304  0 toggle @Test(groups = "Functional")
305    public void testFindFeatureColour_contactFeature()
306    {
307    /*
308    * currently contact feature == type "Disulphide Bond" or "Disulfide Bond" !!
309    */
310  0 seq.addSequenceFeature(new SequenceFeature("Disulphide Bond",
311    "Contact", 2, 12, Float.NaN, "Disulphide"));
312  0 fr.setColour("Disulphide Bond", new FeatureColour(Color.red));
313  0 fr.featuresAdded();
314  0 av.setShowSequenceFeatures(true);
315   
316    /*
317    * Contact positions are residues 2 and 12
318    * which are columns 1 and 14
319    * positions in between don't count for a contact feature!
320    */
321  0 Color c = finder.findFeatureColour(Color.blue, seq, 10);
322  0 assertEquals(c, Color.blue);
323  0 c = finder.findFeatureColour(Color.blue, seq, 8);
324  0 assertEquals(c, Color.blue);
325  0 c = finder.findFeatureColour(Color.blue, seq, 1);
326  0 assertEquals(c, Color.red);
327  0 c = finder.findFeatureColour(Color.blue, seq, 14);
328  0 assertEquals(c, Color.red);
329    }
330   
 
331  0 toggle @Test(groups = "Functional")
332    public void testFindFeatureAtEnd()
333    {
334    /*
335    * terminal residue feature
336    */
337  0 seq.addSequenceFeature(new SequenceFeature("PDBRESNUM", "pdb res 1",
338    seq.getEnd(), seq.getEnd(), Float.NaN, "1seq.pdb"));
339  0 fr.setColour("PDBRESNUM", new FeatureColour(Color.red));
340  0 fr.featuresAdded();
341  0 av.setShowSequenceFeatures(true);
342   
343    /*
344    * final column should have PDBRESNUM feature, the others not
345    */
346  0 Color c = finder.findFeatureColour(Color.blue, seq,
347    seq.getLength() - 2);
348  0 assertNotEquals(c, Color.red);
349  0 c = finder.findFeatureColour(Color.blue, seq, seq.getLength() - 1);
350  0 assertEquals(c, Color.red);
351    }
352   
 
353  0 toggle @Test(groups = "Functional")
354    public void testFindFeatureColour_graduatedFeatureColour()
355    {
356  0 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 2,
357    2, 0f, "KdGroup"));
358  0 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 4,
359    4, 5f, "KdGroup"));
360  0 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 7,
361    7, 10f, "KdGroup"));
362   
363    /*
364    * graduated colour from 0 to 10
365    */
366  0 Color min = new Color(100, 50, 150);
367  0 Color max = new Color(200, 0, 100);
368  0 FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
369  0 fr.setColour("kd", fc);
370  0 fr.featuresAdded();
371  0 av.setShowSequenceFeatures(true);
372   
373    /*
374    * position 2, column 1, score 0 - minimum colour in range
375    */
376  0 Color c = finder.findFeatureColour(Color.blue, seq, 1);
377  0 assertEquals(c, min);
378   
379    /*
380    * position 7, column 9, score 10 - maximum colour in range
381    */
382  0 c = finder.findFeatureColour(Color.blue, seq, 9);
383  0 assertEquals(c, max);
384   
385    /*
386    * position 4, column 3, score 5 - half way from min to max
387    */
388  0 c = finder.findFeatureColour(Color.blue, seq, 3);
389  0 assertEquals(c, new Color(150, 25, 125));
390    }
391   
 
392  0 toggle @Test(groups = "Functional")
393    public void testFindFeatureColour_transparencySingleFeature()
394    {
395  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
396    Float.NaN, "MetalGroup"));
397  0 FeatureColour red = new FeatureColour(Color.red);
398  0 fr.setColour("Metal", red);
399  0 fr.featuresAdded();
400  0 av.setShowSequenceFeatures(true);
401   
402    /*
403    * the FeatureSettings transparency slider has range 0-70 which
404    * corresponds to a transparency value of 1 - 0.3
405    * A value of 0.4 gives a combination of
406    * 0.4 * red(255, 0, 0) + 0.6 * cyan(0, 255, 255) = (102, 153, 153)
407    */
408  0 fr.setTransparency(0.4f);
409  0 Color c = finder.findFeatureColour(Color.cyan, seq, 10);
410  0 assertEquals(c, new Color(102, 153, 153));
411    }
412   
 
413  0 toggle @Test(groups = "Functional")
414    public void testFindFeatureColour_transparencyTwoFeatures()
415    {
416  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
417    Float.NaN, "MetalGroup"));
418  0 FeatureColour red = new FeatureColour(Color.red);
419  0 fr.setColour("Metal", red);
420  0 fr.featuresAdded();
421  0 seq.addSequenceFeature(new SequenceFeature("Domain", "Domain", 4, 15,
422    Float.NaN, "DomainGroup"));
423  0 FeatureColour green = new FeatureColour(Color.green);
424  0 fr.setColour("Domain", green);
425  0 fr.featuresAdded();
426  0 av.setShowSequenceFeatures(true);
427   
428    /*
429    * Domain (green) rendered above Metal (red) above background (cyan)
430    * 1) 0.6 * red(255, 0, 0) + 0.4 * cyan(0, 255, 255) = (153, 102, 102)
431    * 2) 0.6* green(0, 255, 0) + 0.4 * (153, 102, 102) = (61, 194, 41) rounded
432    */
433  0 fr.setTransparency(0.6f);
434  0 Color c = finder.findFeatureColour(Color.cyan, seq, 10);
435  0 assertEquals(c, new Color(61, 194, 41));
436   
437    /*
438    * now promote Metal above Domain
439    * - currently no way other than mimicking reordering of
440    * table in Feature Settings
441    * Metal (red) rendered above Domain (green) above background (cyan)
442    * 1) 0.6 * green(0, 255, 0) + 0.4 * cyan(0, 255, 255) = (0, 255, 102)
443    * 2) 0.6* red(255, 0, 0) + 0.4 * (0, 255, 102) = (153, 102, 41) rounded
444    */
445  0 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
446  0 data[0] = new FeatureSettingsBean("Metal", red, null, true);
447  0 data[1] = new FeatureSettingsBean("Domain", green, null, true);
448  0 fr.setFeaturePriority(data);
449  0 c = finder.findFeatureColour(Color.cyan, seq, 10);
450  0 assertEquals(c, new Color(153, 102, 41));
451   
452    /*
453    * ..and turn off display of Metal
454    * Domain (green) above background (pink)
455    * 0.6 * green(0, 255, 0) + 0.4 * pink(255, 175, 175) = (102, 223, 70)
456    */
457  0 data[0] = new FeatureSettingsBean("Metal", red, null, false);
458  0 fr.setFeaturePriority(data);
459  0 c = finder.findFeatureColour(Color.pink, seq, 10);
460  0 assertEquals(c, new Color(102, 223, 70));
461    }
462   
 
463  0 toggle @Test(groups = "Functional")
464    public void testNoFeaturesDisplayed()
465    {
466    /*
467    * no features on alignment to render
468    */
469  0 assertTrue(finder.noFeaturesDisplayed());
470   
471    /*
472    * add a feature
473    * it will be automatically set visible but we leave
474    * the viewport configured not to show features
475    */
476  0 av.setShowSequenceFeatures(false);
477  0 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
478    Float.NaN, "MetalGroup"));
479  0 FeatureColour red = new FeatureColour(Color.red);
480  0 fr.setColour("Metal", red);
481  0 fr.featuresAdded();
482  0 assertTrue(finder.noFeaturesDisplayed());
483   
484    /*
485    * turn on feature display
486    */
487  0 av.setShowSequenceFeatures(true);
488  0 assertFalse(finder.noFeaturesDisplayed());
489   
490    /*
491    * turn off display of Metal
492    */
493  0 FeatureSettingsBean[] data = new FeatureSettingsBean[1];
494  0 data[0] = new FeatureSettingsBean("Metal", red, null, false);
495  0 fr.setFeaturePriority(data);
496  0 assertTrue(finder.noFeaturesDisplayed());
497   
498    /*
499    * turn display of Metal back on
500    */
501  0 fr.setVisible("Metal");
502  0 assertFalse(finder.noFeaturesDisplayed());
503   
504    /*
505    * turn off MetalGroup - has no effect here since the group of a
506    * sequence feature instance is independent of its type
507    */
508  0 fr.setGroupVisibility("MetalGroup", false);
509  0 assertFalse(finder.noFeaturesDisplayed());
510   
511    /*
512    * a finder with no feature renderer
513    */
514  0 FeatureColourFinder finder2 = new FeatureColourFinder(null);
515  0 assertTrue(finder2.noFeaturesDisplayed());
516    }
517   
 
518  0 toggle @Test(groups = "Functional")
519    public void testFindFeatureColour_graduatedWithThreshold()
520    {
521  0 String kdFeature = "kd";
522  0 String metalFeature = "Metal";
523  0 seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 2,
524    2, 0f, "KdGroup"));
525  0 seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 4,
526    4, 5f, "KdGroup"));
527  0 seq.addSequenceFeature(new SequenceFeature(metalFeature, "Fe", 4, 4,
528    5f, "MetalGroup"));
529  0 seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 7,
530    7, 10f, "KdGroup"));
531   
532    /*
533    * kd feature has graduated colour from 0 to 10
534    * above threshold value of 5
535    */
536  0 Color min = new Color(100, 50, 150);
537  0 Color max = new Color(200, 0, 100);
538  0 FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
539  0 fc.setAboveThreshold(true);
540  0 fc.setThreshold(5f);
541  0 fr.setColour(kdFeature, fc);
542  0 FeatureColour green = new FeatureColour(Color.green);
543  0 fr.setColour(metalFeature, green);
544  0 fr.featuresAdded();
545   
546    /*
547    * render order is kd above Metal
548    */
549  0 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
550  0 data[0] = new FeatureSettingsBean(kdFeature, fc, null, true);
551  0 data[1] = new FeatureSettingsBean(metalFeature, green, null, true);
552  0 fr.setFeaturePriority(data);
553   
554  0 av.setShowSequenceFeatures(true);
555   
556    /*
557    * position 2, column 1, score 0 - below threshold - default colour
558    */
559  0 Color c = finder.findFeatureColour(Color.blue, seq, 1);
560  0 assertEquals(c, Color.blue);
561   
562    /*
563    * position 4, column 3, score 5 - at threshold
564    * should return Green (colour of Metal feature)
565    */
566  0 c = finder.findFeatureColour(Color.blue, seq, 3);
567  0 assertEquals(c, Color.green);
568   
569    /*
570    * position 7, column 9, score 10 - maximum colour in range
571    */
572  0 c = finder.findFeatureColour(Color.blue, seq, 9);
573  0 assertEquals(c, max);
574   
575    /*
576    * now colour below threshold of 5
577    */
578  0 fc.setBelowThreshold(true);
579   
580    /*
581    * position 2, column 1, score 0 - min colour
582    */
583  0 c = finder.findFeatureColour(Color.blue, seq, 1);
584  0 assertEquals(c, min);
585   
586    /*
587    * position 4, column 3, score 5 - at threshold
588    * should return Green (colour of Metal feature)
589    */
590  0 c = finder.findFeatureColour(Color.blue, seq, 3);
591  0 assertEquals(c, Color.green);
592   
593    /*
594    * position 7, column 9, score 10 - above threshold - default colour
595    */
596  0 c = finder.findFeatureColour(Color.blue, seq, 9);
597  0 assertEquals(c, Color.blue);
598    }
599    }