sanssouci-org / sanssouci

Post hoc inference via multiple testing
https://sanssouci-org.github.io/sanssouci/
10 stars 3 forks source link

Let users see a protein network from his selection #40

Closed nicolas-enjalbert closed 3 years ago

nicolas-enjalbert commented 3 years ago

The first choosen way is to add hyperlink in DTtable going to stringDb web-site.

pneuvial commented 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

nicolas-enjalbert commented 3 years ago

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 )