1 package jalview.ext.ensembl;
3 import jalview.datamodel.SequenceFeature;
4 import jalview.io.gff.SequenceOntology;
6 public class EnsemblGenome extends EnsemblSeqProxy
9 * fetch transcript features on genomic sequence (to identify the transcript
10 * regions) and cds, exon and variation features (to retain)
12 private static final EnsemblFeatureType[] FEATURES_TO_FETCH = {
13 EnsemblFeatureType.transcript, EnsemblFeatureType.exon,
14 EnsemblFeatureType.cds, EnsemblFeatureType.variation };
16 public EnsemblGenome()
22 public String getDbName()
24 return "ENSEMBL (Genome)";
28 protected EnsemblSeqType getSourceEnsemblType()
30 return EnsemblSeqType.GENOMIC;
34 protected EnsemblFeatureType[] getFeaturesToFetch()
36 return FEATURES_TO_FETCH;
40 * Answers true unless the feature type is 'transcript' (or a sub-type of
41 * transcript in the Sequence Ontology). Transcript features are only
42 * retrieved in order to identify the transcript sequence range, and are
43 * redundant information on the transcript sequence itself.
46 protected boolean retainFeature(String type)
48 return !SequenceOntology.getInstance().isA(type,
49 SequenceOntology.TRANSCRIPT);
53 * Answers true if the sequence feature type is 'transcript' (or a subtype of
54 * transcript in the Sequence Ontology), and the ID of the feature is the
55 * transcript we are retrieving
58 protected boolean identifiesSequence(SequenceFeature sf, String accId)
60 if (SequenceOntology.getInstance().isA(sf.getType(),
61 SequenceOntology.TRANSCRIPT))
63 String id = (String) sf.getValue(ID);
64 if (("transcript:" + accId).equals(id))