Clover icon

Coverage Report

  1. Project Clover database Thu Dec 4 2025 16:11:35 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.995815999.6%
 

Contributing tests

This file is covered by 16 tests. .

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  1 toggle @BeforeClass(alwaysRun = true)
78    public void setUp()
79    {
80    // aligned column 8 is sequence position 6
81  1 String s = ">s1\nABCDE---FGHIJKLMNOPQRSTUVWXYZ\n";
82  1 af = new FileLoader().LoadFileWaitTillLoaded(s,
83    DataSourceType.PASTE);
84  1 av = af.getViewport();
85  1 seq = av.getAlignment().getSequenceAt(0);
86  1 fr = af.getFeatureRenderer();
87  1 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  16 toggle @BeforeMethod(alwaysRun = true)
95    public void setUpBeforeTest()
96    {
97  16 List<SequenceFeature> sfs = seq.getSequenceFeatures();
98  16 for (SequenceFeature sf : sfs)
99    {
100  22 seq.deleteFeature(sf);
101    }
102  16 fr.findAllFeatures(true);
103   
104    /*
105    * reset all feature groups to visible
106    */
107  16 for (String group : fr.getGroups(false))
108    {
109  0 fr.setGroupVisibility(group, true);
110    }
111   
112  16 fr.clearRenderOrder();
113  16 av.setShowSequenceFeatures(true);
114    }
115   
 
116  1 toggle @Test(groups = "Functional")
117    public void testFindFeatureColour_noFeatures()
118    {
119  1 av.setShowSequenceFeatures(false);
120  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
121  1 assertEquals(c, Color.blue);
122   
123  1 av.setShowSequenceFeatures(true);
124  1 c = finder.findFeatureColour(Color.blue, seq, 10);
125  1 assertEquals(c, Color.blue);
126    }
127   
 
128  1 toggle @Test(groups = "Functional")
129    public void testFindFeatureColour_noFeaturesShown()
130    {
131  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
132    Float.NaN, "MetalGroup"));
133  1 fr.featuresAdded();
134  1 av.setShowSequenceFeatures(false);
135  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
136  1 assertEquals(c, Color.blue);
137    }
138   
 
139  1 toggle @Test(groups = "Functional")
140    public void testFindFeatureColour_singleFeatureAtPosition()
141    {
142  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
143    Float.NaN, "MetalGroup"));
144  1 fr.setColour("Metal", new FeatureColour(Color.red));
145  1 fr.featuresAdded();
146  1 av.setShowSequenceFeatures(true);
147  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
148  1 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  1 toggle @Test(groups = "Functional")
156    public void testFindFeatureColour_gapPosition()
157    {
158  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12, 0f,
159    null));
160  1 fr.setColour("Metal", new FeatureColour(Color.red));
161  1 fr.featuresAdded();
162  1 av.setShowSequenceFeatures(true);
163  1 Color c = finder.findFeatureColour(null, seq, 6);
164  1 assertNull(c);
165    }
166   
167    /**
168    * Nested features coloured by label - expect the colour of the enclosed
169    * feature
170    */
 
171  1 toggle @Test(groups = "Functional")
172    public void testFindFeatureColour_nestedFeatures()
173    {
174  1 SequenceFeature sf1 = new SequenceFeature("domain", "peptide", 1, 120,
175    0f, null);
176  1 seq.addSequenceFeature(sf1);
177  1 SequenceFeature sf2 = new SequenceFeature("domain", "binding", 10, 20,
178    0f, null);
179  1 seq.addSequenceFeature(sf2);
180  1 FeatureColourI fc = new FeatureColour(Color.red);
181  1 fc.setColourByLabel(true);
182  1 fr.setColour("domain", fc);
183  1 fr.featuresAdded();
184  1 av.setShowSequenceFeatures(true);
185  1 Color c = finder.findFeatureColour(null, seq, 15);
186  1 assertEquals(c, fr.getColor(sf2, fc));
187    }
 
188  1 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  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
196    Float.NaN, "MetalGroup"));
197  1 FeatureColour red = new FeatureColour(Color.red);
198  1 fr.setColour("Metal", red);
199  1 fr.featuresAdded();
200  1 seq.addSequenceFeature(new SequenceFeature("Domain", "Domain", 4, 15,
201    Float.NaN, "DomainGroup"));
202  1 FeatureColour green = new FeatureColour(Color.green);
203  1 fr.setColour("Domain", green);
204  1 fr.featuresAdded();
205  1 av.setShowSequenceFeatures(true);
206   
207    /*
208    * expect Domain (green) to be rendered above Metal (red)
209    */
210  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
211  1 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  1 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
219  1 data[0] = new FeatureSettingsBean("Metal", red, null, true);
220  1 data[1] = new FeatureSettingsBean("Domain", green, null, true);
221  1 fr.setFeaturePriority(data);
222  1 c = finder.findFeatureColour(Color.blue, seq, 10);
223  1 assertEquals(c, Color.red);
224   
225    /*
226    * ..and turn off display of Metal
227    */
228  1 data[0] = new FeatureSettingsBean("Metal", red, null, false);
229  1 fr.setFeaturePriority(data);
230  1 c = finder.findFeatureColour(Color.blue, seq, 10);
231  1 assertEquals(c, Color.green);
232    }
233   
 
234  1 toggle @Test(groups = "Functional")
235    public void testFindFeatureColour_singleFeatureNotAtPosition()
236    {
237  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 8, 12,
238    Float.NaN, "MetalGroup"));
239  1 fr.setColour("Metal", new FeatureColour(Color.red));
240  1 fr.featuresAdded();
241  1 av.setShowSequenceFeatures(true);
242    // column 2 = sequence position 3
243  1 Color c = finder.findFeatureColour(Color.blue, seq, 2);
244  1 assertEquals(c, Color.blue);
245    }
246   
 
247  1 toggle @Test(groups = "Functional")
248    public void testFindFeatureColour_featureTypeNotDisplayed()
249    {
250  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
251    Float.NaN, "MetalGroup"));
252  1 FeatureColour red = new FeatureColour(Color.red);
253  1 fr.setColour("Metal", red);
254  1 fr.featuresAdded();
255  1 av.setShowSequenceFeatures(true);
256  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
257  1 assertEquals(c, Color.red);
258   
259    /*
260    * turn off display of Metal - is this the easiest way to do it??
261    */
262  1 FeatureSettingsBean[] data = new FeatureSettingsBean[1];
263  1 data[0] = new FeatureSettingsBean("Metal", red, null, false);
264  1 fr.setFeaturePriority(data);
265  1 c = finder.findFeatureColour(Color.blue, seq, 10);
266  1 assertEquals(c, Color.blue);
267   
268    /*
269    * turn display of Metal back on
270    */
271  1 data[0] = new FeatureSettingsBean("Metal", red, null, true);
272  1 fr.setFeaturePriority(data);
273  1 c = finder.findFeatureColour(Color.blue, seq, 10);
274  1 assertEquals(c, Color.red);
275    }
276   
 
277  1 toggle @Test(groups = "Functional")
278    public void testFindFeatureColour_featureGroupNotDisplayed()
279    {
280  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
281    Float.NaN, "MetalGroup"));
282  1 FeatureColour red = new FeatureColour(Color.red);
283  1 fr.setColour("Metal", red);
284  1 fr.featuresAdded();
285  1 av.setShowSequenceFeatures(true);
286  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
287  1 assertEquals(c, Color.red);
288   
289    /*
290    * turn off display of MetalGroup
291    */
292  1 fr.setGroupVisibility("MetalGroup", false);
293  1 c = finder.findFeatureColour(Color.blue, seq, 10);
294  1 assertEquals(c, Color.blue);
295   
296    /*
297    * turn display of MetalGroup back on
298    */
299  1 fr.setGroupVisibility("MetalGroup", true);
300  1 c = finder.findFeatureColour(Color.blue, seq, 10);
301  1 assertEquals(c, Color.red);
302    }
303   
 
304  1 toggle @Test(groups = "Functional")
305    public void testFindFeatureColour_contactFeature()
306    {
307    /*
308    * currently contact feature == type "Disulphide Bond" or "Disulfide Bond" !!
309    */
310  1 seq.addSequenceFeature(new SequenceFeature("Disulphide Bond",
311    "Contact", 2, 12, Float.NaN, "Disulphide"));
312  1 fr.setColour("Disulphide Bond", new FeatureColour(Color.red));
313  1 fr.featuresAdded();
314  1 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  1 Color c = finder.findFeatureColour(Color.blue, seq, 10);
322  1 assertEquals(c, Color.blue);
323  1 c = finder.findFeatureColour(Color.blue, seq, 8);
324  1 assertEquals(c, Color.blue);
325  1 c = finder.findFeatureColour(Color.blue, seq, 1);
326  1 assertEquals(c, Color.red);
327  1 c = finder.findFeatureColour(Color.blue, seq, 14);
328  1 assertEquals(c, Color.red);
329    }
330   
 
331  1 toggle @Test(groups = "Functional")
332    public void testFindFeatureAtEnd()
333    {
334    /*
335    * terminal residue feature
336    */
337  1 seq.addSequenceFeature(new SequenceFeature("PDBRESNUM", "pdb res 1",
338    seq.getEnd(), seq.getEnd(), Float.NaN, "1seq.pdb"));
339  1 fr.setColour("PDBRESNUM", new FeatureColour(Color.red));
340  1 fr.featuresAdded();
341  1 av.setShowSequenceFeatures(true);
342   
343    /*
344    * final column should have PDBRESNUM feature, the others not
345    */
346  1 Color c = finder.findFeatureColour(Color.blue, seq,
347    seq.getLength() - 2);
348  1 assertNotEquals(c, Color.red);
349  1 c = finder.findFeatureColour(Color.blue, seq, seq.getLength() - 1);
350  1 assertEquals(c, Color.red);
351    }
352   
 
353  1 toggle @Test(groups = "Functional")
354    public void testFindFeatureColour_graduatedFeatureColour()
355    {
356  1 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 2,
357    2, 0f, "KdGroup"));
358  1 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 4,
359    4, 5f, "KdGroup"));
360  1 seq.addSequenceFeature(new SequenceFeature("kd", "hydrophobicity", 7,
361    7, 10f, "KdGroup"));
362   
363    /*
364    * graduated colour from 0 to 10
365    */
366  1 Color min = new Color(100, 50, 150);
367  1 Color max = new Color(200, 0, 100);
368  1 FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
369  1 fr.setColour("kd", fc);
370  1 fr.featuresAdded();
371  1 av.setShowSequenceFeatures(true);
372   
373    /*
374    * position 2, column 1, score 0 - minimum colour in range
375    */
376  1 Color c = finder.findFeatureColour(Color.blue, seq, 1);
377  1 assertEquals(c, min);
378   
379    /*
380    * position 7, column 9, score 10 - maximum colour in range
381    */
382  1 c = finder.findFeatureColour(Color.blue, seq, 9);
383  1 assertEquals(c, max);
384   
385    /*
386    * position 4, column 3, score 5 - half way from min to max
387    */
388  1 c = finder.findFeatureColour(Color.blue, seq, 3);
389  1 assertEquals(c, new Color(150, 25, 125));
390    }
391   
 
392  1 toggle @Test(groups = "Functional")
393    public void testFindFeatureColour_transparencySingleFeature()
394    {
395  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
396    Float.NaN, "MetalGroup"));
397  1 FeatureColour red = new FeatureColour(Color.red);
398  1 fr.setColour("Metal", red);
399  1 fr.featuresAdded();
400  1 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  1 fr.setTransparency(0.4f);
409  1 Color c = finder.findFeatureColour(Color.cyan, seq, 10);
410  1 assertEquals(c, new Color(102, 153, 153));
411    }
412   
 
413  1 toggle @Test(groups = "Functional")
414    public void testFindFeatureColour_transparencyTwoFeatures()
415    {
416  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
417    Float.NaN, "MetalGroup"));
418  1 FeatureColour red = new FeatureColour(Color.red);
419  1 fr.setColour("Metal", red);
420  1 fr.featuresAdded();
421  1 seq.addSequenceFeature(new SequenceFeature("Domain", "Domain", 4, 15,
422    Float.NaN, "DomainGroup"));
423  1 FeatureColour green = new FeatureColour(Color.green);
424  1 fr.setColour("Domain", green);
425  1 fr.featuresAdded();
426  1 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  1 fr.setTransparency(0.6f);
434  1 Color c = finder.findFeatureColour(Color.cyan, seq, 10);
435  1 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  1 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
446  1 data[0] = new FeatureSettingsBean("Metal", red, null, true);
447  1 data[1] = new FeatureSettingsBean("Domain", green, null, true);
448  1 fr.setFeaturePriority(data);
449  1 c = finder.findFeatureColour(Color.cyan, seq, 10);
450  1 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  1 data[0] = new FeatureSettingsBean("Metal", red, null, false);
458  1 fr.setFeaturePriority(data);
459  1 c = finder.findFeatureColour(Color.pink, seq, 10);
460  1 assertEquals(c, new Color(102, 223, 70));
461    }
462   
 
463  1 toggle @Test(groups = "Functional")
464    public void testNoFeaturesDisplayed()
465    {
466    /*
467    * no features on alignment to render
468    */
469  1 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  1 av.setShowSequenceFeatures(false);
477  1 seq.addSequenceFeature(new SequenceFeature("Metal", "Metal", 2, 12,
478    Float.NaN, "MetalGroup"));
479  1 FeatureColour red = new FeatureColour(Color.red);
480  1 fr.setColour("Metal", red);
481  1 fr.featuresAdded();
482  1 assertTrue(finder.noFeaturesDisplayed());
483   
484    /*
485    * turn on feature display
486    */
487  1 av.setShowSequenceFeatures(true);
488  1 assertFalse(finder.noFeaturesDisplayed());
489   
490    /*
491    * turn off display of Metal
492    */
493  1 FeatureSettingsBean[] data = new FeatureSettingsBean[1];
494  1 data[0] = new FeatureSettingsBean("Metal", red, null, false);
495  1 fr.setFeaturePriority(data);
496  1 assertTrue(finder.noFeaturesDisplayed());
497   
498    /*
499    * turn display of Metal back on
500    */
501  1 fr.setVisible("Metal");
502  1 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  1 fr.setGroupVisibility("MetalGroup", false);
509  1 assertFalse(finder.noFeaturesDisplayed());
510   
511    /*
512    * a finder with no feature renderer
513    */
514  1 FeatureColourFinder finder2 = new FeatureColourFinder(null);
515  1 assertTrue(finder2.noFeaturesDisplayed());
516    }
517   
 
518  1 toggle @Test(groups = "Functional")
519    public void testFindFeatureColour_graduatedWithThreshold()
520    {
521  1 String kdFeature = "kd";
522  1 String metalFeature = "Metal";
523  1 seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 2,
524    2, 0f, "KdGroup"));
525  1 seq.addSequenceFeature(new SequenceFeature(kdFeature, "hydrophobicity", 4,
526    4, 5f, "KdGroup"));
527  1 seq.addSequenceFeature(new SequenceFeature(metalFeature, "Fe", 4, 4,
528    5f, "MetalGroup"));
529  1 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  1 Color min = new Color(100, 50, 150);
537  1 Color max = new Color(200, 0, 100);
538  1 FeatureColourI fc = new FeatureColour(null, min, max, null, 0, 10);
539  1 fc.setAboveThreshold(true);
540  1 fc.setThreshold(5f);
541  1 fr.setColour(kdFeature, fc);
542  1 FeatureColour green = new FeatureColour(Color.green);
543  1 fr.setColour(metalFeature, green);
544  1 fr.featuresAdded();
545   
546    /*
547    * render order is kd above Metal
548    */
549  1 FeatureSettingsBean[] data = new FeatureSettingsBean[2];
550  1 data[0] = new FeatureSettingsBean(kdFeature, fc, null, true);
551  1 data[1] = new FeatureSettingsBean(metalFeature, green, null, true);
552  1 fr.setFeaturePriority(data);
553   
554  1 av.setShowSequenceFeatures(true);
555   
556    /*
557    * position 2, column 1, score 0 - below threshold - default colour
558    */
559  1 Color c = finder.findFeatureColour(Color.blue, seq, 1);
560  1 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  1 c = finder.findFeatureColour(Color.blue, seq, 3);
567  1 assertEquals(c, Color.green);
568   
569    /*
570    * position 7, column 9, score 10 - maximum colour in range
571    */
572  1 c = finder.findFeatureColour(Color.blue, seq, 9);
573  1 assertEquals(c, max);
574   
575    /*
576    * now colour below threshold of 5
577    */
578  1 fc.setBelowThreshold(true);
579   
580    /*
581    * position 2, column 1, score 0 - min colour
582    */
583  1 c = finder.findFeatureColour(Color.blue, seq, 1);
584  1 assertEquals(c, min);
585   
586    /*
587    * position 4, column 3, score 5 - at threshold
588    * should return Green (colour of Metal feature)
589    */
590  1 c = finder.findFeatureColour(Color.blue, seq, 3);
591  1 assertEquals(c, Color.green);
592   
593    /*
594    * position 7, column 9, score 10 - above threshold - default colour
595    */
596  1 c = finder.findFeatureColour(Color.blue, seq, 9);
597  1 assertEquals(c, Color.blue);
598    }
599    }