import jalview.datamodel.MappingType;
import jalview.datamodel.SequenceFeature;
import jalview.datamodel.SequenceI;
+import jalview.ext.ensembl.EnsemblSeqProxy;
import jalview.util.MapList;
import jalview.util.StringUtils;
String atts = gff[ATTRIBUTES_COL];
Map<String, List<String>> attributes = parseNameValuePairs(atts);
- if (SequenceOntology.getInstance().isProteinMatch(soTerm))
+ SequenceOntologyI so = SequenceOntologyFactory.getInstance();
+ if (so.isA(soTerm, SequenceOntologyI.PROTEIN_MATCH))
{
- sf = processProteinMatch(attributes, seq, gff, align,
- newseqs, relaxedIdMatching);
+ sf = processProteinMatch(attributes, seq, gff, align, newseqs,
+ relaxedIdMatching);
}
- else if (SequenceOntology.getInstance().isNucleotideMatch(soTerm))
+ else if (so.isA(soTerm, SequenceOntologyI.NUCLEOTIDE_MATCH))
{
sf = processNucleotideMatch(attributes, seq, gff, align,
newseqs, relaxedIdMatching);
desc = target.split(" ")[0];
}
- if (SequenceOntology.getInstance().isSequenceVariant(sf.getType()))
+ SequenceOntologyI so = SequenceOntologyFactory.getInstance();
+ String type = sf.getType();
+ if (so.isA(type, SequenceOntologyI.SEQUENCE_VARIANT))
{
/*
* Ensembl returns dna variants as 'alleles'
}
/*
- * Ensembl returns gene name as 'Name' for a transcript
+ * extract 'Name' for a transcript (to show gene name)
+ * or an exon (so 'colour by label' shows exon boundaries)
*/
- if (SequenceOntology.getInstance().isA(sf.getType(),
- SequenceOntology.TRANSCRIPT))
+ if (EnsemblSeqProxy.isTranscript(type)
+ || so.isA(type, SequenceOntology.EXON))
{
desc = StringUtils.listToDelimitedString(attributes.get("Name"), ",");
}