Planteome / biolink-api

API for linked biological knowledge
http://api.monarchinitiative.org/api/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Configure planteome instance of biolink #2

Open cmungall opened 7 years ago

cmungall commented 7 years ago

Hi Justin,

I'd like to set up a biolink API instance for Planteome. This provides a wrapper onto golr and the ontologies.

The URL could be http://biolink.planteome.org

the only dependency is python3.4 or higher, plus this repo

https://github.com/Planteome/biolink-api

Once cloned, you can just do

./start-server.sh

E.g. in a supervisord job

Note that if you do this right now, it will connect to the wrong database. I can configure this later, you can wait until the first deploy until after I've done this, I just want to make sure this is tracked

cmungall commented 7 years ago

OK, everything should now work out the box.

Examples:

http://localhost:8888/api/bioentity/gene/GR_gene%3AGR%3A0060769/phenotypes/?fetch_objects=true&rows=20

http://localhost:8888/api/bioentity/gene/TAIR%3Alocus%3A2155869/function/?fetch_objects=true&rows=20

http://localhost:8888/api/bioentity/gene/TAIR%3Alocus%3A2155869/expressed/?fetch_objects=true&rows=20

cmungall commented 7 years ago

Hi @elserj we want to use this for an upcoming meeting at the end of the month - can we get this service up?

elserj commented 7 years ago

Might have a couple of issues. I cloned it to our server and tried running it. Looks like gunicorn is missing. Problem is that this is a service and I will have to get approval from sysadmin on this. Probably will, but it could take some time. I'm also going on vacation next week, but can get back to it after.

nathandunn commented 7 years ago

I’ll be presenting it and the end of June.

I’ve started work with getting the same stuff to work with Monarch, so hopefully it translates fairly readily, but it would be good to have a little bit of lead time on this.

Nathan

On Jun 9, 2017, at 4:12 PM, elserj notifications@github.com wrote:

Might have a couple of issues. I cloned it to our server and tried running it. Looks like gunicorn is missing. Problem is that this is a service and I will have to get approval from sysadmin on this. Probably will, but it could take some time. I'm also going on vacation next week, but can get back to it after.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Planteome/biolink-api/issues/2#issuecomment-307521958, or mute the thread https://github.com/notifications/unsubscribe-auth/AAt2qvq_LTAgcc9TqDuuWImDoorNGMPhks5sCdF2gaJpZM4NkaT_.

cmungall commented 7 years ago

Sorry about that, this fixes it https://github.com/Planteome/biolink-api/commit/e77a20e2e63a7e1dc7751d57674777cc4b45488f

you had gunicorn, it just wasn't in your path (we're using pyvenv, which places everything you need in a venv folder)

elserj commented 7 years ago

That didn't actually fix my issue, but looking a bit closer at it, it was failing on installing scipy in pyvenv. Had to do sudo yum install lapack-devel blas-devel as they weren't installed. The non-devel packages were, but I guess it needed the devel to build. Once I did that I ran start-server.sh and it took about 15 minutes or so, but it did then start. I get responses from your examples above.

I'm waiting for the sysadmin to create the CName for biolink.planteome.org as I don't have permissions to do that. I already got permission to start the systemd service, so should be good there. Once the CName is done, I will let you know.

nathandunn commented 7 years ago

This is great news. Thanks.

On Jun 9, 2017, at 5:17 PM, Chris Mungall notifications@github.com wrote:

Sorry about that, this fixes it e77a20e

you had gunicorn, it just wasn't in your path (we're using pyvenv, which places everything you need in a venv folder)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

elserj commented 7 years ago

I think everything is working now: http://biolink.planteome.org/api/bioentity/gene/GR_gene%3AGR%3A0060769/phenotypes/?fetch_objects=true&rows=20

Let me know if you find any issues.

nathandunn commented 7 years ago

@elserj It is close. I think that their might be CORS issues. When I go to this:

http://biolink.planteome.org/api/

Can't read from server. It may not have the appropriate access-control-origin settings.

There is an errored out connection when it tries to retrieve this file:

http://localhost:8888/api/swagger.json

When you do the same thing with Monarch you get:

https://api.monarchinitiative.org/api/swagger.json

nathandunn commented 7 years ago

But the initial link you sent worked.

nathandunn commented 7 years ago

@kltm / @cmungall / @kshefchek Was there a trick to getting swagger installed and made public?

Looks like the underlying service is working great.

elserj commented 7 years ago

Sorry for the delay, took quite some time figure out how to fix this. Probably longer than it should have, but it seems to be fine now.

Enabling CORS alone didn't seem to fix it. Finally started working once I added: ProxyPreserveHost on to the Apache vhost config.

Let me know if you find any more issues.

nathandunn commented 7 years ago

@elserj This is great.

Question (for @cmungall as well).

Should I expect the same set of implementation as with monarch?

Also, for now do we not handle trait, QTL, etc. or are they mapped to something else?

Thanks!

nathandunn commented 7 years ago

It looks like most of these are conserved. I'll try to finish this off shortly and let you know what the mappings are or if I run into any troubles.

nathandunn commented 7 years ago

BTW, @elserj / @cmungall I'm updating the examples (I need to to build tests). You may want to do the same thing in your own swagger:

https://github.com/nathandunn/biolink-planteome

nathandunn commented 7 years ago

These are the ones not working so far. Of course it is possible we don't have the data or they just simply don't make sense:

+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html><head>
+<title>502 Proxy Error</title>
+</head><body>
+<h1>Proxy Error</h1>
+<p>The proxy server received an invalid
+response from an upstream server.<br />
+The proxy server could not handle the request <em><a href="/api/bioentity/EnsemblPlants:GRMZM2G061969_T01/associations/">GET&nbsp;/api/bioentity/EnsemblPlants:GRMZM2G061969_T01/associations/</a></em>.<p>
+Reason: <strong>Error reading from remote server</strong></p></p>
+</body></html>
nathandunn commented 7 years ago

What is the equivalent genotype? My guess is that they may not be represented, which is fine.

nathandunn commented 7 years ago

Looks like genotype maps to gene. I'll note above.

nathandunn commented 7 years ago

So, overall (I gave a few instances) the server is pretty fragile. If I run the same set of test suites over it, I get different 502 errors each time (though they are always fine if I run them individually).

Anyway, not sure if that is something that could be solved this week, but its definitely worth doing.

cmungall commented 7 years ago

Yes, we need to switch off endpoints that planteome-solr cannot answer.

We should have at least gene-function(GO), gene-anatomy(expr), germplasm-trait (should be mapped to genotype)

When I run it individually it is fine, but as part of a test suite, it chokes with this error

weird

thanks for the testing

nathandunn commented 7 years ago

FYI you can reproduce the choking pretty easily by just running a bunch of large queries at once.

For the mapping .. is there a file that exists for this (and monarch for that matter)?

Nathan

On Jun 28, 2017, at 12:28 AM, elserj notifications@github.com wrote:

Sorry for the delay, took quite some time figure out how to fix this. Probably longer than it should have, but it seems to be fine now.

Enabling CORS alone didn't seem to fix it. Finally started working once I added: ProxyPreserveHost on to the Apache vhost config.

Let me know if you find any more issues.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

cmungall commented 7 years ago

mapping: https://github.com/Planteome/biolink-api/blob/master/conf/config.yaml#L22-L28

nathandunn commented 7 years ago

Thanks. That is exactly what I needed.

On Jun 29, 2017, at 12:36 AM, Chris Mungall notifications@github.com wrote:

mapping: https://github.com/Planteome/biolink-api/blob/master/conf/config.yaml#L22-L28 https://github.com/Planteome/biolink-api/blob/master/conf/config.yaml#L22-L28 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/Planteome/biolink-api/issues/2#issuecomment-311811526, or mute the thread https://github.com/notifications/unsubscribe-auth/AAt2qgqQavjJrsJ0eIRaWN-jC_cmw08Rks5sItVrgaJpZM4NkaT_.

nathandunn commented 7 years ago
  1. Almost all "fetch X for ID" return 500 errors. Gene, phenotye, anatomy, etc.

  2. Anatomy subclasses return null property value results including for sub-classes that we have confirmed gene (or phenotype) associations: http://biolink.planteome.org/api/bioentity/anatomy/PO%3A0025131/genes/?rows=20&fetch_objects=true (returns null property results)

Same for phenotypes and environment.