Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use search rather than accession service. #60

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
language: node_js
node_js:
- 0.10
- "5"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should just stick with 8 if that's available?

- "6"
- "7"
- "8"
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions src/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
}
Expand Down
9 changes: 7 additions & 2 deletions src/FeaturesViewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down