forked from snesic/manhattan-plot-eQTLs-per-gene
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.R
34 lines (27 loc) · 1.29 KB
/
app.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(shiny)
source("prepareData.R")
source("manhattan_gene.R")
# Manhattan plot of SNVs with their corresonding (-log) p-values
# associated with expression of the gene `r topGene`.
# R shiny app
ui <- fluidPage(
titlePanel("Manhattan plot"),
fluidRow(column(6, sliderInput(inputId = 'gene_width',
label = 'Choose width around gene',
value = 25,
min = 1,
max = 10)),
column(6, selectizeInput(inputId = "gene_name",
choices = res$gene_name,
selected = NULL,
label = 'Choose gene'))),
plotOutput('manhattan')
)
server <- function(input, output){
output$manhattan <- renderPlot({plot_manhattan_gene(res,
snps,
input$gene_name,
gtf,
w = input$gene_width)})
}
shinyApp(ui = ui, server = server)