statgen/locuszoom-api

GET /statistic/pair/LD/ not working

Closed this issue · 2 comments

Hi

I am trying to use the pairwise-LD API, described here.
But for this I first need to know the encoding of the reference panels. I tried GET /statistic/pair/LD/ using curl "http://portaldev.sph.umich.edu/api/v1/statistic/pair/LD/", but that returns a 404 error.

Has this page moved somewhere new?

Many thanks!
Sina

Unfortunately that endpoint was never implemented. The panels currently available are:

ID PANEL POPULATION BUILD VERSION
1 1000G ALL ALL 37 Phase 3 v5a
2 1000G EUR EUR 37 Phase 3 v5a

An example curl request retrieving LD for a reference variant:

curl -G "http://portaldev.sph.umich.edu/api/v1/statistic/pair/LD/results/" --data-urlencode "filter=reference eq 1 and chromosome2 eq '16' and position2 ge 53519169 and position2 le 54119169 and variant1 eq '16:53819169_T/C'"

We only really support usage of the API through locuszoom.js and not so much for general purpose use. I would caution you not to use this in a production environment, as we may change LD panels or return formats in the future. For one-off analysis purposes, it would probably be fine to use it, though you may want to cache or locally store LD results so that your analyses are repeatable in the future.

One of our colleagues is planning to make available a general purpose LD calculation server, but it isn't quite ready yet. You could watch that github repository for future developments.

Thank you!

I will watch the LDserver repo for the future.