statgen / locuszoom-api

Flask server code for LocusZoom APIs
https://portaldev.sph.umich.edu/docs/api/v1/
1 stars 3 forks source link

Change LD limit to region size, not flank from reference variant #13

Closed welchr closed 7 years ago

welchr commented 7 years ago

A user reported a query that fails when they attempt to calculate LD in a reasonable sized window very far upstream from the reference variant:

https://portaldev.sph.umich.edu/api/v1/pair/LD/results/?filter=reference eq 1 and chromosome2 eq '1' and position2 ge 114550452 and position2 le 115067678 and variant1 eq '1:209990122_G/GTGTA'&fields=chr,pos,rsquare

The API currently limits the window size around a reference variant in which LD can be calculated. I had assumed in LZ that people would not be trying to calculate that far away from the reference variant, which turns out to be not true.

A simple fix is just to restrict the LD region size itself, but ignore how far it is from the reference variant.