Closed nicolas-enjalbert closed 3 years ago
Note: this uses the API to generate a static image of the corresponding network. It would be nice to actually go to the web site. It seems to be possible to get a url associated to a query, by using
/api/tsv/get_link
To activate an url link in a data table:
UrlStringdbGrah <- function(vector){
vector[2:length(vector)] <- paste0("%0d", vector[2:length(vector)])
url <- paste("https://string-db.org/api/image/network?identifiers=", paste(vector, collapse = ""), "&species=9606", sep="")
return(url)
}
url <- UrlStringdbGrah(vectorGene)
paste('<a target="_blanck" href="', url, '" >User selection ',n, '</a>', sep="")
To print the data table use the parameter escape=FALSE :
renderDT({
tableResult()
}, selection = list(mode = 'single', selectable = -(1)) , escape = FALSE )
The first choosen way is to add hyperlink in DTtable going to stringDb web-site.