mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Start adding an UI using Shiny
This commit is contained in:
parent
be696b91a0
commit
5d59018b2e
4 changed files with 118 additions and 3 deletions
23
server.R
Normal file
23
server.R
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
library(data.table)
|
||||
library(DT)
|
||||
library(shiny)
|
||||
|
||||
source("data.R")
|
||||
source("scatter_plot.R")
|
||||
|
||||
data <- load_data_cached("input")
|
||||
|
||||
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)
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue