Ensembl REST API Optional Parameters
1
0
Entering edit mode
4.3 years ago
Noushin N ▴ 600

Hello,

Can anyone please share an example of how one can specify optional parameters when using VEP through Ensembl REST API? I am following the examples on this page and would like to limit the results to those from canonical transcripts, and only return the maximum allele frequency in any population.

Best, Noushin

P.S. Tagging Emily_Ensembl

ensembl VEP • 2.2k views
ADD COMMENT
0
Entering edit mode

Are you putting this in a script (if so what language), just plugging a URL into a browser or using a REST client? Are you using POST or GET endpoints?

ADD REPLY
0
Entering edit mode

Thank you! I am using this in an R script and using POST endpoint.

ADD REPLY
5
Entering edit mode
4.3 years ago
Emily 23k

We have Jupyter notebooks that take you through a training course on using the REST API in different coding languages. This page covers how to use POST endpoints in R, and includes how to add optional parameters. Simply, you add them to the endpoint URL after a /. There's even a VEP example in there, although it is a different parameter.

ADD COMMENT
1
Entering edit mode

Thanks, Emily_Ensembl ! The tutorials were great.

For future reference of myself and others, here is an example of how one would add protein domain annotation and uniprot protein ids to vep results for an input specified in genomic coordinates:

server <- "http://grch37.rest.ensembl.org"
ext <- "/vep/homo_sapiens/region/?domains=1&uniprot=1"
query <- "17 7578407 - G A"

body <- sprintf('{ "variants" : ["%s"] }', query)
r <- httr::POST(paste(server, ext, sep = ""), httr::content_type("application/json"),
                        httr::accept("application/json"), body = body)
annot <- jsonlite::fromJSON(jsonlite::toJSON(httr::content(r)))
ADD REPLY
0
Entering edit mode

Your links are dead (misleading) here, it would be helpful if you could restore them to a more useful state!

ADD REPLY
0
Entering edit mode

The Ensembl REST API online course, with links to the Jupyter notebooks can be found here: https://www.ebi.ac.uk/training/online/courses/ensembl-rest-api/

ADD REPLY

Login before adding your answer.

Traffic: 3381 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6