X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fext%2Fensembl%2FEnsemblGene.java;h=37c787b37222a61a29e186554ec346ecbe22bc88;hb=defcce0ef74ffc0923b4387bcb5f0d867bf64831;hp=d6e7d857a81d063de73ff614a18b0fc2f78683f1;hpb=853624fb32058cccc544ae7d13af6ad4b0800b6c;p=jalview.git diff --git a/src/jalview/ext/ensembl/EnsemblGene.java b/src/jalview/ext/ensembl/EnsemblGene.java index d6e7d85..37c787b 100644 --- a/src/jalview/ext/ensembl/EnsemblGene.java +++ b/src/jalview/ext/ensembl/EnsemblGene.java @@ -1,3 +1,23 @@ +/* + * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$) + * Copyright (C) $$Year-Rel$$ The Jalview Authors + * + * This file is part of Jalview. + * + * Jalview is free software: you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation, either version 3 + * of the License, or (at your option) any later version. + * + * Jalview is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty + * of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Jalview. If not, see . + * The Jalview Authors are detailed in the 'AUTHORS' file. + */ package jalview.ext.ensembl; import jalview.api.FeatureColourI; @@ -170,7 +190,22 @@ public class EnsemblGene extends EnsemblSeqProxy geneIds.add(geneId); } } + else if (isProteinIdentifier(acc)) + { + String tscriptId = new EnsemblLookup(getDomain()).getParent(acc); + if (tscriptId != null) + { + String geneId = new EnsemblLookup(getDomain()) + .getParent(tscriptId); + if (geneId != null && !geneIds.contains(geneId)) + { + geneIds.add(geneId); + } + } + // NOTE - acc is lost if it resembles an ENS.+ ID but isn't actually + // resolving to one... e.g. ENSMICP00000009241 + } /* * if given a gene or other external name, lookup and fetch * the corresponding gene for all model organisms