Skip to content

Commit

Permalink
Merge pull request loosolab#15 from HendrikSchultheis/workshop
Browse files Browse the repository at this point in the history
Bugfixes
  • Loading branch information
HendrikSchultheis authored May 29, 2018
2 parents 4c0dd37 + bad82bb commit 4842b10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion R/geneView.R
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ geneView <- function(input, output, session, data, metadata, level = NULL, plot.

#enable plot button only if plot possible
shiny::observe({
if(is.null(input$genes) | length(selector$selectedColumns()) < 1){
if(is.null(input$genes) || !shiny::isTruthy(selector$selectedColumns())){
shinyjs::disable("plot")
}else if(input$plotType == "violin"){
factor1.levels <- metadata.r()[level == selector$type() & key %in% selector$selectedColumns() & factor1 != ""][, .N, keyby = factor1][["N"]]
Expand Down
6 changes: 3 additions & 3 deletions R/pca.R
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel =
})
levels.r <- shiny::reactive({
if(is.null(levels)){
metadata.r()[["level"]]
types.r()[["level"]]
}else{
if(shiny::is.reactive(levels)){
levels()
Expand Down Expand Up @@ -162,11 +162,11 @@ pca <- function(input, output, session, data, types, levels = NULL, entryLabel =
shinyjs::reset("dimB")
shinyjs::reset("pointsize")
shinyjs::reset("labelsize")
columnSelect <<- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r(), c("key", "level"), with = FALSE]), columnTypeLabel = "Column types to choose from")
columnSelect <<- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r()]), columnTypeLabel = "Column types to choose from")
clearPlot(TRUE)
})

columnSelect <- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r(), c("key", "level"), with = FALSE]), columnTypeLabel = "Column types to choose from")
columnSelect <- shiny::callModule(columnSelector, "select", type.columns = shiny::reactive(types.r()[level %in% levels.r()]), columnTypeLabel = "Column types to choose from")

output$datalevel <- shiny::renderUI({
shiny::selectInput(session$ns("select"), label = "select data level", choices = unique(levels.r()))
Expand Down

0 comments on commit 4842b10

Please sign in to comment.