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

Association Rest API Endpoint to Get One Association Record #57

Open
sprintell opened this issue Sep 19, 2024 · 1 comment
Open

Association Rest API Endpoint to Get One Association Record #57

sprintell opened this issue Sep 19, 2024 · 1 comment

Comments

@sprintell
Copy link
Member

sprintell commented Sep 19, 2024

As developer I want an association details API endpoint such that when I send a GET request to the URL I can get full details of a single association data in JSON Format

This will be a replacement to the old endpoint https://www.ebi.ac.uk/gwas/rest/api/studies

{
   "associationId":14347,
   "riskFrequency":"NR",
   "pvalueDescription":"(progression)",
   "pvalueMantissa":7,
   "pvalueExponent":-8,
   "multiSnpHaplotype":false,
   "snpInteraction":false,
   "snpType":"novel",
   "standardError":null,
   "range":null,
   "description":null,
   "orPerCopyNum":null,
   "betaNum":null,
   "betaUnit":null,
   "betaDirection":null,
   "lastMappingDate":"2023-09-15T12:31:10.000+0000",
   "lastUpdateDate":"2023-09-15T12:31:10.000+0000",
   “efoTrait”: "Dupuytren Contracture",
   "pValue":7e-8,
   "_links":{
  	"self":{
     	"href":"{base_url}/v1/associations/14347"
  	},
  	"locus":{
     	"href":"{base_url}/v1/associations/14347/loci"
  	},
  	"search":{
     	"href":"{base_url}/v1/associations?fullPvalueSet"
  	}

Must Have Additional Payload Attributes - These are displayed on the catalog UI:

  • discovery_ancestry (country of recruitment): "4390 European (U.K.)"
  • Traits: ["mental or behavioural disorder", "attempted suicide"]
  • Platform [SNPs passing QC]: "Affymetrix [1922309] (imputed)"
  • Replication ancestry (country of recruitment): "1649 NR (NR), 2698 European (Germany)"
  • Full Summary Statistics: "NA"
  • Terms/Licence: "https://www.ebi.ac.uk/about/terms-of-use/"
  • backgroundEfoTraits: ["",""]

Management Rules

  • Rule 1: Endpoint - /v1/associations/{associationId}
  • Rule 2: HTTP Request Method - GET
  • Rule 3: Endpoint should accept association id
  • Rule 4: Endpoint should return full attributes of the association
  • Rule 5: Endpoint should be accessible to all

Acceptance Criteria

  • Given a correct association Id
  • When a user sends a GET request to the endpoint
  • A single corresponding association data is returned in JSON Format
  • Given a wrong association id
  • When a GET request is sent to the endpoint
  • Properly described Resource not found exception error should be returned as JSON payload

Additional details here

@sajo-ebi
Copy link
Contributor

Local Code changes completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants