Open ghost opened 8 years ago
It would be ideal if we had a dashboard for our CouchLincs server. This dashboard would display the following information:
Here is some sample code for querying and formatting data from couchbase.
library(httr) url <- "http://54.152.59.84:8093/query/service" zs <- function(x) { unlist(x$zscore) } id <- function(x) { x$id } # get gene ids statement <- ("SELECT meta(LINCS1).id, data.gene_id FROM LINCS1 WHERE meta(LINCS1).id = 'GSM1715626'") gids <- unlist(data$results[[1]]$gene_id) # get zscores statement <- ("SELECT meta(LINCS1).id, data.gene_id, data.zscore FROM LINCS1 WHERE metadata.cell_line = 'A375'") res <- POST(url, query=list(statement=statement)) data <- content(res, as = 'parsed') zscores <- sapply(data[[3]], zs) colnames(zscores) <- sapply(data[[3]], id) rownames(zscores) <- gids
Skeleton for dashboard using shinydashboard introduced in 63e2109c1eb5cd54cd8dd9203f9296e718fa1cb0
shinydashboard
It would be ideal if we had a dashboard for our CouchLincs server. This dashboard would display the following information:
Here is some sample code for querying and formatting data from couchbase.