statgen / pheweb

A tool to build a website to browse hundreds or thousands of GWAS.
MIT License
158 stars 65 forks source link

RESTful API specs #107

Closed phuwanat closed 6 years ago

phuwanat commented 6 years ago

Hi,

Is there a doc on available API requests available for UK biobank's pheweb? Thank you!

pjvandehaar commented 6 years ago

No documentation is available right now, and I'm not making any guarantees that the current API (used by the site itself) will be preserved, but I don't have plans to change it much soon.

What are you looking to do?

phuwanat commented 6 years ago

I would like to query hits (phenotypes and corresponding p values) for a set of SNPs. If so, I could try looking through the code. Thank you very much.

On Mar 23, 2018 2:47 AM, "Peter VandeHaar" notifications@github.com wrote:

No documentation is available right now, and I'm not making any guarantees that the current API (used by the site itself) will be preserved, but I don't have plans to change it much soon.

What are you looking to do?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/statgen/pheweb/issues/107#issuecomment-375560650, or mute the thread https://github.com/notifications/unsubscribe-auth/ANmM9rHoO9gRmA7X7_QeejW4h1PSSmSrks5thJqKgaJpZM4S0Xo1 .

pjvandehaar commented 6 years ago

This URL should work: http://pheweb.sph.umich.edu:5003/api/variant/6-32879471-A-G

phuwanat commented 6 years ago

My plan is ~ 200 SNPs and would be one time (for this paper : )

Thank you very much

Sent from Mail for Windows 10

From: Peter VandeHaar Sent: Monday, March 26, 2018 10:38 AM To: statgen/pheweb Cc: Phuwanat; Author Subject: Re: [statgen/pheweb] RESTful API specs (#107)

• How many SNPs? (ie, tens, hundreds, thousands, ten-thousands?) • Is this a one-time use, or are you interested in doing this a lot? Here's a curl command to get json for a variant. Please don't run it more than 1000 times, and not more than once per second (eg, add sleep 1 in your script). This might break at any time when I change PheWeb, but it won't break in the next 48 hours. curl --silent 'http://pheweb.sph.umich.edu:5003/variant/6-26123502-T-C' | grep 'window.variant =' | perl -pale 's/^.*?{/{/; s{;$}{}' — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

pjvandehaar commented 6 years ago

Try this URL instead of the curl-based approach: http://pheweb.sph.umich.edu:5003/api/variant/6-32879471-A-G (and again, please no more than one request per second).

phuwanat commented 6 years ago

Thanks! This is very helpful.

Sent from Mail for Windows 10

From: Peter VandeHaar Sent: Monday, March 26, 2018 10:42 AM To: statgen/pheweb Cc: Phuwanat; Author Subject: Re: [statgen/pheweb] RESTful API specs (#107)

Try this URL instead of the curl-based approach: http://pheweb.sph.umich.edu:5003/api/variant/6-32879471-A-G — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.