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

[Raremetal-server] Issues with missing masks and encoding #11

Open
abought opened this issue May 6, 2019 · 0 comments
Open

[Raremetal-server] Issues with missing masks and encoding #11

abought opened this issue May 6, 2019 · 0 comments

Comments

@abought
Copy link
Member

abought commented May 6, 2019

Summary

We have found two issues with Raremetal-server covariance endpoint:

  1. If any of the masks in a region are empty, the server rejects the entire request.
  2. It seems that the success of the request is partially sensitive to the content-type encoding header sent to the server. (see example below using requests; introspect differences using test.request.headers)

Expected behavior

This is a topic for discussion.

Reproducible test case

In the below example, mask 3 is empty for this region, but all other masks are valid.

#!/usr/bin/env python3
import requests

payload = {
  "chrom":"19",
  "start":45400845,
  "stop":45420845,
  "genotypeDataset":1,
  "phenotypeDataset":1,
  "phenotype":"hdl",
  "samples":"ALL",
  "genomeBuild":"GRCh37",
  "masks":[1,2,3,4,5,6]
}

test = requests.post("https://portaldev.sph.umich.edu/raremetal/v1/aggregation/covariance", json=payload)
print(f"{test.status_code} {test.reason}")
print(test.json())

Interestingly, if the POST request is sent using data= instead of json=, the request will succeed. (due to a different content-type header being sent with the request)

abought added a commit to statgen/locuszoom that referenced this issue May 20, 2019
(for APOE gene in LDL phenotype)

See related bug that impacts release:
 statgen/LDServer#11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant