Skip to content

Commit

Permalink
Merge pull request #201 from tcezard/fix/link_ENA_Assembly
Browse files Browse the repository at this point in the history
Replace the ENA base URL of the link to point to correct location
  • Loading branch information
tcezard authored Jan 5, 2024
2 parents c4a4891 + 350f418 commit ec2be8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/js/eva-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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*/,
Expand Down
6 changes: 3 additions & 3 deletions src/js/views/eva-variant-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}
Expand Down

0 comments on commit ec2be8f

Please sign in to comment.