EBISPOT / gwas-ui

Apache License 2.0
5 stars 4 forks source link

Genomic Region Associations - API endpoint to get all associations resources associated to a given Genomic Region #287

Closed sprintell closed 1 year ago

sprintell commented 1 year ago

As developer I want an api endpoint So that when I send a GET request, hateoas, paginated list of all associations associated to a given Genomic Region in the database is returned in JSON Format

Management Rules: Rule 1: Endpoint - /v2/regions/{regionId}/associations Rule 2: HTTP Request Method - GET Rule 3: HATEOAS, with filer, sorting, pagination, and sizing Rule 4: Endpoint should accept filter, and sort parameters as in /associations?mapped-gene=...&page=0&size=20&sort=...

Rule 5: Search filter should be available for: variant-risk-allele, p-value-annotation, mapped-gene, reported-trait, efo-trait, background, accession, location

Rule 6: Sort feature should be available for: p-value, p-value-annotation, raf, or, beta, location, Optional Sorts (reported-trait, efo-trait, background-trait)

Rule 6: Returned Study Json entity must include: Variant and risk allele, P-value, P-value annotation, RAF, OR, Beta, CI, Mapped gene, Reported trait, Trait(s), Background trait(s) , Study accession, Location

Acceptance Tests: Given no parameter When the front end sends a GET request to the endpoint Hateoas compliant list of studies is returned in the specified JSON Format

Given sorting, pagination, and/or some search and filter parameters When the front end sends a GET request to thesame endpoint Hateoas compliant filtered list of studies satisfying the conditions in the url parameter must be returned

sajo-ebi commented 1 year ago

@ala-ebi The API details are below -:

uri -: http://gwas-snoopy.ebi.ac.uk:9780/gwas/api/v2/regions/{regionId}/associations

Search Params -:

@JsonProperty("riskAllele")
    private String riskAllele;

    @JsonProperty("pValueAnnotation")
    private String pValueAnnotation;

    @JsonProperty("mappedGene")
    private String mappedGene;

    @JsonProperty("accessionId")
    private String accessionId;

    @JsonProperty("reportedTrait")
    private String reportedTrait;

    @JsonProperty("efoTrait")
    private String efoTrait;

    @JsonProperty("bgTrait")
    private String bgTrait;

Sort Params -:

pvalue, raf, beta, or