geposanui/server.R

24 lines
518 B
R
Raw Normal View History

2021-06-24 22:38:16 +02:00
library(data.table)
library(DT)
library(shiny)
2021-08-25 12:03:11 +02:00
source("input.R")
2021-06-24 22:38:16 +02:00
source("scatter_plot.R")
2021-08-25 11:59:27 +02:00
source("util.R")
2021-06-24 22:38:16 +02:00
2021-08-25 12:03:11 +02:00
data <- run_cached("input", load_input, "input")
2021-06-24 22:38:16 +02:00
server <- function(input, output) {
output$genes <- renderDT({
datatable(
data$genes[, c("name", "chromosome")],
rownames = FALSE,
style = "bootstrap"
)
})
output$scatter <- renderPlot({
gene_ids <- data$genes[input$genes_rows_selected, id]
scatter_plot(gene_ids, data)
})
}