1 package jalview.ext.ensembl;
3 import jalview.datamodel.SequenceFeature;
5 public class EnsemblGenome extends EnsemblSeqProxy
8 * fetch transcript features on genomic sequence (to identify the transcript
9 * regions) and cds, exon and variation features (to retain)
11 private static final EnsemblFeatureType[] FEATURES_TO_FETCH = {
12 EnsemblFeatureType.transcript, EnsemblFeatureType.exon,
13 EnsemblFeatureType.cds, EnsemblFeatureType.variation };
15 public EnsemblGenome()
21 public String getDbName()
23 return "ENSEMBL (Genome)";
27 protected EnsemblSeqType getSourceEnsemblType()
29 return EnsemblSeqType.GENOMIC;
33 protected EnsemblFeatureType[] getFeaturesToFetch()
35 return FEATURES_TO_FETCH;
39 * Answers true unless the feature type is 'transcript' (or a sub-type of
40 * transcript in the Sequence Ontology). Transcript features are only
41 * retrieved in order to identify the transcript sequence range, and are
42 * redundant information on the transcript sequence itself.
45 protected boolean retainFeature(SequenceFeature sf, String accessionId)
47 if (isTranscript(sf.getType()))
51 return featureMayBelong(sf, accessionId);
55 * Answers true if the sequence feature type is 'transcript' (or a subtype of
56 * transcript in the Sequence Ontology), and the ID of the feature is the
57 * transcript we are retrieving
60 protected boolean identifiesSequence(SequenceFeature sf, String accId)
62 if (isTranscript(sf.getType()))
64 String id = (String) sf.getValue(ID);
65 if (("transcript:" + accId).equals(id))