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

Gene page API issues, documentation, and testing #621

Closed
kdahlquist opened this issue May 18, 2018 · 15 comments
Closed

Gene page API issues, documentation, and testing #621

kdahlquist opened this issue May 18, 2018 · 15 comments

Comments

@kdahlquist
Copy link
Collaborator

Currently on beta v3.0.5, the gene page is opening, but data is not being loaded.

Copied over a post by @johnllopez616 from #573:

I discovered that at least one of the data loading issues is related to the first part of getUniProtInfo() within api.js. What this function does is make a request to UniProt Retrieve/ID Mapping to retrieve the UniProt entry ID as part of the UniProt API request. I've noticed that the current function to make this request isn't reliable. I will investigate further later today.

Once the basic functionality is up for @kdahlquist to look at on beta, we also want to make sure that if a user has a gene that is not found in one or more databases, the appropriate "not found" messages come up. There are two cases to consider:

  • if the gene is just not found at all in any database
  • if the gene is found in one or more, but not all databases

When the Fall 2017 BioDB wiki is back up, @kdahlquist will review the documentation there to generate a guide to the expected results. If it's not up by Monday the 21st, she will re-generate this documentation so it is not a blocker to progress on this issue.

@kdahlquist
Copy link
Collaborator Author

Problem: identical requests to UniProt will sometimes work and sometimes will not. A request for information about a particular gene will either return the proper information or will return an error. Note that we don't know why this is happening.

Solution: have it make identical requests until one of the requests is successful and returns proper data.

Next problem: None of the gene information will display on gene page unless all API calls are successful.

Proposed solution: These need to be independent of each other. Not found or other such message should display on gene page for information not found from a particular database.

@kdahlquist
Copy link
Collaborator Author

I just looked at beta v3.0.6 and there still isn't any information populated on the gene page.

@jlopez616
Copy link
Collaborator

It would appear that the api.js file returns a 404 error on beta when uploaded to the server.

@dondi
Copy link
Owner

dondi commented May 18, 2018

Yes, try using a fully-relative URL. (no leading slash)

@kdahlquist
Copy link
Collaborator Author

@johnllopez616 and I discussed that an error modal will only come up if there gene information is not found at all in any database.

I'm noting here in the demo that @johnllopez616 showed me that the biodb class put "N/A" for information I requested that they were not able to implement during the semester. @kdahlquist will need to review each of these items and determine whether we should give up on it or try to implement it.

@jlopez616
Copy link
Collaborator

@dondi refreshed the server following PR #626, I had some issues with the server on my end which is why there was such a delay, but GRNsight v3.0.8 is on beta

@jlopez616
Copy link
Collaborator

The following error emerges on Chrome when the API call to JASPAR is made unless the following plugin is installed.
Failed to load http://jaspar.genereg.net/api/v1/matrix/?tax_id=4932&format=json&search=YHP1: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://grnsight.cs.lmu.edu' is therefore not allowed access.

@kdahlquist
Copy link
Collaborator Author

Change text of Error that comes up when gene information not retrieved from the database:

Three-part framework:

  1. Explain what the problem is.
  2. Explain why the problem exists.
  3. How the user can approach solving the problem.

So in the case of the gene backpages:

  • Let's not throw a warning unless no gene information is retrieved at all. If some, but not all, gene information is retrieved, we will just fill those fields with "not found".
  • Then if no gene information is retrieved at all, then the Error should come up. Let's make the error read:

No gene information was retrieved for .

This could have happened because either GRNsight could not access the gene information from one of the source databases or because no information exists for the gene in the source databases.

You can check back later to see if gene information can be retrieved or submit an issue to https://github.com/dondi/GRNsight.

@dondi
Copy link
Owner

dondi commented May 21, 2018

Does the error continue to persist? Make sure that it isn’t transient. As far as I know, JASPAR did use to work, and their website says they do support it:

http://jaspar.genereg.net/api/overview#cors-requests

(You might need to read up on CORS a bit so you can get more background)

If we do determine that this isn’t a transient error, then there appears to be inconsistency between their documentation and the actual API, and it may be necessary to contact the developer directly regarding their CORS support (or lack of).

@mihirsamdarshi
Copy link
Collaborator

I advised @johnllopez616 to break down the filterData function into its various sub-parts so as to make each individual call easily diagnosable.

@kdahlquist
Copy link
Collaborator Author

The BioDB class had to make a relay to get around the CORS problem at Jaspar.

@kdahlquist
Copy link
Collaborator Author

The relay file that BioDB class made needs to be moved into server; they put it in the wrong place.

@jlopez616
Copy link
Collaborator

Will begin investigating the process for writing tests, particularly those involving the API calls. I'm reading up on the SinonJS framework now, as suggested by @dondi

@kdahlquist
Copy link
Collaborator Author

This is still in progress, so I'm removing the "for next release" tag.

@kdahlquist
Copy link
Collaborator Author

Remaining threads from this issue have been broken out into new issues, #681 and #682, so closing this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants