An example ENSEMBL gene ID identifier list:
ENSMUSG00000082108 ENSMUSG00000022485 ENSMUSG00000050621 ENSMUSG00000020387 ENSMUSG00000028626 ENSMUSG00000025400 ENSMUSG00000021268 ENSMUSG00000087095 ENSMUSG00000026247 ENSMUSG00000017344 ENSMUSG00000020427
Will output:
ENSMUSG00000082108 Gm13777 ENSMUSG00000022485 Hoxc5 ENSMUSG00000050621 Rps27rt ENSMUSG00000020387 Jade2 ENSMUSG00000028626 Col9a2 ENSMUSG00000025400 Tac2 ENSMUSG00000021268 Meg3 ENSMUSG00000087095 Emx2os ENSMUSG00000026247 Ecel1 ENSMUSG00000017344 Vtn ENSMUSG00000020427 Igfbp3
GET request for a single ID:
http://biotools.fr/mouse/ensembl_symbol_converter/?api=1&id=ENSMUSG00000082108will output:
{"ENSMUSG00000082108":"Gm13777"}
POST request with ids submitted as a JSON array:
endpoint: https://biotools.fr/mouse/ensembl_symbol_converter/
POST variables:
api = 1
ids = ["ENSMUSG00000082108","ENSMUSG00000022485","ENSMUSG00000050621"]
endpoint: https://biotools.fr/mouse/ensembl_symbol_converter/ POST variables: api = 1 ids = ["ENSMUSG00000082108","ENSMUSG00000022485","ENSMUSG00000050621"]
Will output:
{"ENSMUSG00000082108":"Gm13777","ENSMUSG00000022485":"Hoxc5","ENSMUSG00000050621":"Rps27rt"}
Example R code:
require(httr)
require(jsonlite)
###
# A single ID to convert - use a GET request
###
url = "http://biotools.fr/mouse/ensembl_symbol_converter/?api=1&id=ENSMUSG00000082108"
r <- GET(url)
output = fromJSON( content(r, "text"), flatten=TRUE)
df <- as.data.frame(output)
df
###
# Multiple IDs to convert - use a POST request
###
url = "http://biotools.fr/mouse/ensembl_symbol_converter/"
ids = c("ENSMUSG00000082108","ENSMUSG00000022485","ENSMUSG00000050621")
ids_json <- toJSON(ids)
body <- list(api=1, ids=ids_json)
r <- POST(url, body = body)
output = fromJSON( content(r, "text"), flatten=TRUE)
df <- as.data.frame(output)
df
