From 36217c0c575b1a04fc8069a311ae5d59398df56f Mon Sep 17 00:00:00 2001 From: gmungoc Date: Fri, 9 Oct 2015 16:11:18 +0100 Subject: [PATCH] JAL-1499 sequence feature type = "Gene" or "Domain" (colour by label) --- src/jalview/io/MegaFile.java | 6 +++--- test/jalview/io/MegaFileTest.java | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) 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 -- 1.7.10.2