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" 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);