Commit 8ae65b27 authored by Marek Ostaszewski's avatar Marek Ostaszewski
Browse files

version updates, improved reaction query

parent e274e22a
################################################## ##################################################
## Script purpose: An example of MINERVA API call to retrieve ## Script purpose: An example of MINERVA API call to retrieve
## HGNC symbols of elements targetted by a given drug, ## HGNC symbols of elements targeted by a given drug,
## and to retrieve drugs targetting elements with a given UniProt ## and to retrieve drugs targeting elements with a given UniProt
## Date: 17/03/2020 ## Date: 17/03/2020 (updated 02.05.2022)
## Author: Marek Ostaszewski (marek.ostaszewski@uni.lu) ## Author: Marek Ostaszewski (marek.ostaszewski@uni.lu)
## MINERVA API version: 14.0 ## MINERVA API version: 15.0
################################################## ##################################################
### A convenience function to handle GET and POST requests to MINERVA API ### A convenience function to handle GET and POST requests to MINERVA API
......
################################################## ##################################################
## Script purpose: An example of MINERVA API call to retrieve elements with a ## Script purpose: An example of MINERVA API call to retrieve elements with a
## given uniprot id and their interactions ## given UniProt id and their interactions
## Date: 17/03/2020 ## Date: 17/03/2020 (updated 02.05.2022)
## Author: Marek Ostaszewski (marek.ostaszewski@uni.lu) ## Author: Marek Ostaszewski (marek.ostaszewski@uni.lu)
## MINERVA API version: 14.0 ## MINERVA API version: 15.0
################################################## ##################################################
### A convenience function to handle GET and POST requests to MINERVA API ### A convenience function to handle GET and POST requests to MINERVA API
...@@ -47,13 +47,14 @@ identifiers <- model_elements$id[hits] ...@@ -47,13 +47,14 @@ identifiers <- model_elements$id[hits]
model_reactions <- fromJSON(ask_GET(base_url, model_reactions <- fromJSON(ask_GET(base_url,
paste0("models/*/bioEntities/reactions/?participantId=", paste0("models/*/bioEntities/reactions/?participantId=",
paste(identifiers, collapse = ","), paste(identifiers, collapse = ","),
"&columns=reactionId"))) "&columns=id")))
### Create a validation URL for the disease map these identifiers come from ### Create a validation URL for the disease map these identifiers come from
visualize_reactions <- "https://pdmap.uni.lu/minerva/?search=" ### "search.perfect=true" is needed if we use MINERVA internal identifiers
visualize_reactions <- "https://pdmap.uni.lu/minerva/?search.perfect=true&search="
### Get searchable reaction identifiers from the search results ### Get searchable reaction identifiers from the search results
searchable_identifiers <- paste(paste0("reaction:", model_reactions$reactionId), collapse = ";") searchable_identifiers <- paste(paste0("reaction:", model_reactions$id), collapse = ";")
### Create the final link ### Create the final link
print(paste0(visualize_reactions, searchable_identifiers)) print(paste0(visualize_reactions, searchable_identifiers))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment