JAL-1499 sequence feature type = "Gene" or "Domain" (colour by label)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 9 Oct 2015 15:11:18 +0000 (16:11 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 9 Oct 2015 15:11:18 +0000 (16:11 +0100)
src/jalview/io/MegaFile.java
test/jalview/io/MegaFileTest.java

index b9cc546..d4ec4b4 100644 (file)
@@ -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);
       }
index 40a7c6e..62dd3e6 100644 (file)
@@ -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