JAL-1705 derive transcript sequences from gene sequence/GFF; handle CDS
[jalview.git] / src / jalview / ext / ensembl / EnsemblCdna.java
index e4eb873..0a97425 100644 (file)
@@ -45,20 +45,22 @@ public class EnsemblCdna extends EnsemblSeqProxy
   }
 
   /**
-   * Answers true unless the feature type is 'exon' (or a sub-type of exon in
-   * the Sequence Ontology). Exon features are only retrieved in order to
-   * identify the exon sequence loci, and are redundant information on the exon
-   * sequence itself.
+   * Answers true unless the feature type is 'transcript' or 'exon' (or a
+   * sub-type in the Sequence Ontology). These features are only retrieved in
+   * order to identify the exon sequence loci, and are redundant information on
+   * the exon sequence itself.
    */
   @Override
   protected boolean retainFeature(SequenceFeature sf, String accessionId)
   {
-    if (SequenceOntology.getInstance().isA(sf.getType(),
-            SequenceOntology.EXON))
+    SequenceOntology so = SequenceOntology.getInstance();
+    String type = sf.getType();
+
+    if (isTranscript(type) || so.isA(type, SequenceOntology.EXON))
     {
       return false;
     }
-    return super.retainFeature(sf, accessionId);
+    return featureMayBelong(sf, accessionId);
   }
 
   /**