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

Genomic Context Rest API Endpoint to Get All Genomic Contexts for a given SNP #65

Open
sprintell opened this issue Sep 20, 2024 · 0 comments

Comments

@sprintell
Copy link
Member

As developer I want Genomic Context API endpoint such that that when I send a GET request to the URL with a given rsId, hateoas compliant, paginated list of all genomic contexts for a given SNP in the database is returned in JSON Format

This is a new endpoint, this is required to also ensure scalability, it was previously embedded in the SingleNucleotidePolymorphism endpoint, but now a child object accessible from within the SNP payload as a link on the URL

{
   "isIntergenic":true,
   "isUpstream":false,
   "isDownstream":true,
   "distance":1484,
   "gene":{
  	"geneName":"RPL18",
  	"entrezGeneIds":[
     	{
        	"entrezGeneId":"6141"
     	}
  	],
  	"ensemblGeneIds":[
     	{
        	"ensemblGeneId":"ENSG00000063177"
     	}
  	]
   },
   "source":"NCBI",
   "mappingMethod":"Ensembl_pipeline",
   "isClosestGene":true,
   "_links":{
  	"locatons":{
     	"href":"{base_url}/v1/single-nucleotide-polymorphisms/rs433852/locations"
  	}
   }
}

Management Rules

  • Rule 1: Endpoint - /v1/single-nucleotide-polymorphisms/{rs12019358}/genomic-contexts
  • Rule 2: HTTP Request Method - GET
  • Rule 3: Endpoint should accept rsId as a path variable
  • Rule 4: Endpoint should return full attributes of the genomic-contexts
  • Rule 5: Endpoint should be accessible to all

Acceptance Criteria:

  • Given a correct rsId, when the front end sends a GET request to the endpoint
  • List of corresponding genomic-contexts data is returned in JSON Format
  • Given a wrong rsId, 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

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