From: gmungoc Date: Fri, 9 Oct 2015 15:11:18 +0000 (+0100) Subject: JAL-1499 sequence feature type = "Gene" or "Domain" (colour by label) X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=36217c0c575b1a04fc8069a311ae5d59398df56f;p=jalview.git JAL-1499 sequence feature type = "Gene" or "Domain" (colour by label) --- diff --git a/src/jalview/io/MegaFile.java b/src/jalview/io/MegaFile.java index b9cc546..d4ec4b4 100644 --- a/src/jalview/io/MegaFile.java +++ b/src/jalview/io/MegaFile.java @@ -774,9 +774,9 @@ public class MegaFile extends AlignFile /* * don't add feature if entirely gapped in the sequence */ - // TODO: type="Gene" (but then all coloured the same) or - // type="GeneName"? - SequenceFeature sf = new SequenceFeature(featureValue, featureType, + // NB use 'colour feature by label' to show up distinct instances of + // feature type 'Gene' or 'Domain' on the alignment + SequenceFeature sf = new SequenceFeature(featureType, featureValue, sfstart, sfend, 0f, null); sequenceFeatures.get(seqid).add(sf); } diff --git a/test/jalview/io/MegaFileTest.java b/test/jalview/io/MegaFileTest.java index 40a7c6e..62dd3e6 100644 --- a/test/jalview/io/MegaFileTest.java +++ b/test/jalview/io/MegaFileTest.java @@ -745,21 +745,19 @@ public class MegaFileTest * Helper method to assert properties of a SequenceFeature * * @param sf - * @param description * @param type + * @param description * @param begin * @param end */ - protected void verifySequenceFeature(SequenceFeature sf, - String description, String type, int begin, int end) + protected void verifySequenceFeature(SequenceFeature sf, String type, + String description, int begin, int end) { assertEquals(description, sf.type); assertEquals(type, sf.description); assertEquals(begin, sf.begin); assertEquals(end, sf.end); } - - //@formatter:on /** * Test parse of data including !Label statements. An underscore means no