diff --git a/src/js/eva-config.js b/src/js/eva-config.js index c3c4d547..d78e7f9f 100644 --- a/src/js/eva-config.js +++ b/src/js/eva-config.js @@ -126,7 +126,9 @@ VARIANT_TYPE_SO_MAP = {"SNV": "SO:0001483", "NO_SEQUENCE_ALTERATION" : "SO:0002073", "MNV": "SO:0002007"}; SO_SERVICE = "http://www.sequenceontology.org/browser/current_release/term"; -ENA_ASSEMBLY_LOOKUP_SERVICE = "https://www.ebi.ac.uk/ena/browser/api/xml"; +ENA_XML_API_SERVICE = "https://www.ebi.ac.uk/ena/browser/api/xml"; +ENA_TEXT_API_SERVICE = "https://www.ebi.ac.uk/ena/browser/api/text"; +ENA_VIEW_LINK_SERVICE = "https://www.ebi.ac.uk/ena/browser/view"; NCBI_ASSEMBLY_LOOKUP_SERVICE = "https://www.ncbi.nlm.nih.gov/assembly"; ASSEMBLY_GCA_TO_GCF_SYNONYMS = {"GCA_000409795.2" : "GCF_000409795.2" /*Vervet Monkey*/, "GCA_001625215.1" : "GCF_001625215.1" /*Carrot*/, diff --git a/src/js/views/eva-variant-view.js b/src/js/views/eva-variant-view.js index d8639d97..b6cba1e9 100644 --- a/src/js/views/eva-variant-view.js +++ b/src/js/views/eva-variant-view.js @@ -45,7 +45,7 @@ EvaVariantView.prototype = { }, getChromosomeNumberForAccession: function(chromosomeAccession, lineLimit) { - var ENA_TEXT_API_URL = "https://www.ebi.ac.uk/ena/browser/api/text/" + chromosomeAccession + "?lineLimit=" + lineLimit + "&annotationOnly=true"; + var ENA_TEXT_API_URL = ENA_TEXT_API_SERVICE + "/" + chromosomeAccession + "?lineLimit=" + lineLimit + "&annotationOnly=true"; var response = EvaManager.getAPICallResult(ENA_TEXT_API_URL, 'text', this.contigAccessionNotResolvedHandler.bind(this)); var responseLines = response.split("\n"); var numLines = responseLines.length; @@ -129,7 +129,7 @@ EvaVariantView.prototype = { // Default to assembly accession alone this.assemblyNameMap[assemblyAccession] = assemblyAccession; - var assemblyENAXmlUrl = ENA_ASSEMBLY_LOOKUP_SERVICE + "/" + assemblyAccession + "?display=xml" + var assemblyENAXmlUrl = ENA_XML_API_SERVICE + "/" + assemblyAccession + "?display=xml" var xmlResult = EvaManager.getAPICallResult(assemblyENAXmlUrl, 'xml', this.assemblyAccessionNotResolvedHandler.bind(this)); if (xmlResult) { @@ -146,7 +146,7 @@ EvaVariantView.prototype = { assembly = assembly.toUpperCase(); var assemblyLookupService = ""; if (assembly.startsWith("GCA")) { - assemblyLookupService = ENA_ASSEMBLY_LOOKUP_SERVICE; + assemblyLookupService = ENA_VIEW_LINK_SERVICE; } else if (assembly.startsWith("GCF")) { assemblyLookupService = NCBI_ASSEMBLY_LOOKUP_SERVICE; }