import jalview.util.StringUtils;
import java.awt.Color;
+import java.io.UnsupportedEncodingException;
+import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
}
Sequence transcript = new Sequence(accId, seqChars, 1, transcriptLength);
- String geneName = (String) transcriptFeature.getValue(NAME);
- if (geneName != null)
+
+ /*
+ * Ensembl has gene name as transcript Name
+ * EnsemblGenomes doesn't, but has a url-encoded description field
+ */
+ String description = (String) transcriptFeature.getValue(NAME);
+ if (description == null)
+ {
+ description = (String) transcriptFeature.getValue(DESCRIPTION);
+ }
+ if (description != null)
{
- transcript.setDescription(geneName);
+ try
+ {
+ transcript.setDescription(URLDecoder.decode(description, "UTF-8"));
+ } catch (UnsupportedEncodingException e)
+ {
+ e.printStackTrace(); // as if
+ }
}
transcript.createDatasetSequence();