From 5c0b1fa254d6d23a3797baaac43292a9265d9462 Mon Sep 17 00:00:00 2001 From: phoeguo Date: Tue, 30 Apr 2019 13:59:19 -0700 Subject: [PATCH] issue 2 --- shiny_test.R | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 shiny_test.R diff --git a/shiny_test.R b/shiny_test.R deleted file mode 100644 index fa83dfd..0000000 --- a/shiny_test.R +++ /dev/null @@ -1,48 +0,0 @@ -library(g3viz) -library(shiny) - -mutation.csv <- system.file("extdata", "ccle.csv", package = "g3viz") -selectize_values <- function(){ - return(levels(read.csv(mutation.csv, header = T)$Hugo_Symbol)) -} - - -ui <- fluidPage( - titlePanel("g3lollipop test"), - sidebarLayout( - sidebarPanel( - selectizeInput("gene", "Elija un gen de la muestra", selectize_values()) - ), - mainPanel( - g3LollipopOutput("distPlot",width = "800px") - ) - ) -) - -server <- function(input, output, session) { - - - output$distPlot <- renderG3Lollipop({ - - mutation.dat <- readMAF(mutation.csv, - gene.symbol.col = "Hugo_Symbol", - variant.class.col = "Variant_Classification", - protein.change.col = "amino_acid_change", - sep = ",") # column-separator of csv file - - gene <- input$gene - theme <- g3Lollipop.theme(theme.name = "cbioportal", - title.text = paste0(gene, " gene"), - y.axis.label = paste0("# of ", gene, " Mutations")) - theme[['chartWidth']] <- "1600" - - g3Lollipop(mutation.dat, - gene.symbol = gene, - protein.change.col = "amino_acid_change", - plot.options = theme, - btn.style = "gray", - output.filename = "customized_plot") - - }) -} -shinyApp(ui = ui, server = server)