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 (Genomic)";
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), or has a parent other than the given
41 * accession id. Transcript features are only retrieved in order to identify
42 * the transcript sequence range, and are redundant information on the
43 * transcript sequence itself.
46 protected boolean retainFeature(SequenceFeature sf, String accessionId)
48 if (isTranscript(sf.getType()))
52 return featureMayBelong(sf, accessionId);
56 * Answers true if the sequence feature type is 'transcript' (or a subtype of
57 * transcript in the Sequence Ontology), and the ID of the feature is the
58 * transcript we are retrieving
61 protected boolean identifiesSequence(SequenceFeature sf, String accId)
63 if (isTranscript(sf.getType()))
65 String id = (String) sf.getValue(ID);
66 if (("transcript:" + accId).equals(id))