From 81aed8efd699ef862b29dc638605f23b49ad98d3 Mon Sep 17 00:00:00 2001 From: gmungoc Date: Wed, 14 Mar 2018 14:41:14 +0000 Subject: [PATCH] JAL-2679 reinstating changes lost in VCF merge Conflicts: src/jalview/ext/ensembl/EnsemblLookup.java --- src/jalview/ext/ensembl/EnsemblLookup.java | 29 ++-------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/src/jalview/ext/ensembl/EnsemblLookup.java b/src/jalview/ext/ensembl/EnsemblLookup.java index 0ddef2b..877331d 100644 --- a/src/jalview/ext/ensembl/EnsemblLookup.java +++ b/src/jalview/ext/ensembl/EnsemblLookup.java @@ -41,19 +41,6 @@ import org.json.simple.parser.ParseException; */ public class EnsemblLookup extends EnsemblRestClient { - - private static final String OBJECT_TYPE_TRANSLATION = "Translation"; - private static final String PARENT = "Parent"; - private static final String OBJECT_TYPE_TRANSCRIPT = "Transcript"; - private static final String ID = "id"; - private static final String OBJECT_TYPE_GENE = "Gene"; - private static final String OBJECT_TYPE = "object_type"; - - /** - * keep track of last identifier retrieved to break loops - */ - private String lastId; - /** * Default constructor (to use rest.ensembl.org) */ @@ -148,12 +135,11 @@ public class EnsemblLookup extends EnsemblRestClient } /** - * Calls the Ensembl lookup REST endpoint and retrieves the 'Parent' for the - * given identifier, or null if not found + * Returns the gene id related to the given identifier (which may be for a + * gene, transcript or protein) * * @param identifier * @param objectType - * (optional) * @return */ public String getGeneId(String identifier, String objectType) @@ -163,18 +149,7 @@ public class EnsemblLookup extends EnsemblRestClient BufferedReader br = null; try { - URL url = getUrl(identifier, objectType); - - if (identifier.equals(lastId)) - { - System.err.println("** Ensembl lookup " + url.toString() - + " looping on Parent!"); - return null; - } - - lastId = identifier; - if (url != null) { br = getHttpResponse(url, ids); -- 1.7.10.2