From 5ed64d8502c12019b37a344d5f198b262841c409 Mon Sep 17 00:00:00 2001 From: ljgarcia Date: Wed, 26 Sep 2018 16:31:34 +0100 Subject: [PATCH 1/2] Use search rather than accession service. --- package-lock.json | 2 +- src/Constants.js | 8 ++++---- src/FeaturesViewer.js | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index a5be5df..7eac7e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ProtVista", - "version": "2.0.8", + "version": "2.0.11", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/Constants.js b/src/Constants.js index 6586bdd..5ae0fde 100644 --- a/src/Constants.js +++ b/src/Constants.js @@ -12,22 +12,22 @@ var visualizationTypes = { var uniprotSource = 'uniprot'; var uniprotSources = [ { - url: 'https://www.ebi.ac.uk/proteins/api/features/', + url: 'https://www.ebi.ac.uk/proteins/api/features?accession=', source: uniprotSource, category: 'FEATURES' }, { - url: 'https://www.ebi.ac.uk/proteins/api/proteomics/', + url: 'https://www.ebi.ac.uk/proteins/api/proteomics?accession=', source: uniprotSource, category: 'PROTEOMICS' }, { - url: 'https://www.ebi.ac.uk/proteins/api/variation/', + url: 'https://www.ebi.ac.uk/proteins/api/variation?accession=', source: uniprotSource, category: 'VARIATION' }, { - url: 'https://www.ebi.ac.uk/proteins/api/antigen/', + url: 'https://www.ebi.ac.uk/proteins/api/antigen?accession=', source: uniprotSource, category: 'ANTIGEN' } diff --git a/src/FeaturesViewer.js b/src/FeaturesViewer.js index 51f13b4..4055711 100644 --- a/src/FeaturesViewer.js +++ b/src/FeaturesViewer.js @@ -418,8 +418,13 @@ var loadSources = function(opts, dataSources, loaders, delegates, fv) { var dataLoader = DataLoader.get(url); loaders.push(dataLoader); dataLoader.done(function (d) { - if (d instanceof Array) //Workaround to be removed - d = d[0]; + if (d instanceof Array) { + if (d.length === 0) { + return; + } else { + d = d[0]; //Workaround to be removed + } + } // First promise to resolve will set global parameters if (!fv.sequence) { fv.loadZoom(d); From 32cd66d4e2557a7118248e23422f05345b79710c Mon Sep 17 00:00:00 2001 From: ljgarcia Date: Wed, 26 Sep 2018 17:18:17 +0100 Subject: [PATCH 2/2] Attempt to update travis --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 20fd86b..b602b4b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ language: node_js node_js: - - 0.10 + - "5" + - "6" + - "7" + - "8"