package jalview.ext.ensembl;
import jalview.datamodel.SequenceFeature;
-import jalview.io.gff.SequenceOntology;
+import jalview.io.gff.SequenceOntologyFactory;
+import jalview.io.gff.SequenceOntologyI;
import java.util.List;
public class EnsemblCdna extends EnsemblSeqProxy
{
+ // TODO modify to accept other species e.g. ENSMUSPnnn
+ private static final Regex ACCESSION_REGEX = new Regex(
+ "(ENST|ENSG|CCDS)[0-9.]{3,}$");
+
/*
- * fetch exon features on genomic sequence (to identify the cdnaregions)
+ * fetch exon features on genomic sequence (to identify the cdna regions)
* and cds and variation features (to retain)
*/
private static final EnsemblFeatureType[] FEATURES_TO_FETCH = {
@Override
public Regex getAccessionValidator()
{
- return new Regex("((ENST|ENSG|CCDS)[0-9.]{3,})");
+ return ACCESSION_REGEX;
}
@Override
@Override
protected boolean identifiesSequence(SequenceFeature sf, String accId)
{
- if (SequenceOntology.getInstance().isA(sf.getType(),
- SequenceOntology.EXON))
+ if (SequenceOntologyFactory.getInstance().isA(sf.getType(),
+ SequenceOntologyI.EXON))
{
String parentFeature = (String) sf.getValue(PARENT);
if (("transcript:" + accId).equals(parentFeature))