Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add possibility to remove example; bump version
  • Loading branch information
jenzopr committed Oct 14, 2019
1 parent 676eb88 commit d7911c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
3 changes: 3 additions & 0 deletions wilson-basic/.Renviron.j2
Expand Up @@ -6,3 +6,6 @@ WILSON_SIDEPANELWIDTH={{ "WILSON_SIDEPANELWIDTH"|env("2") }}

# Define with of the main panel
WILSON_MAINPANELWIDTH={{ "WILSON_MAINPANELWIDTH"|env("10") }}

# Remove examples from data source
WILSON_BLACKLIST_EXAMPLES={{ "WILSON_BLACKLIST_EXAMPLES"|env("false") }}
15 changes: 12 additions & 3 deletions wilson-basic/app.R
Expand Up @@ -11,7 +11,7 @@ if(!requireNamespace("shinyBS", quietly = TRUE)) { stop("The package shinyBS nee
if(!requireNamespace("htmltools", quietly = TRUE)) { stop("The package htmltools needs to be installed in order to use this app.")}

# Set versions
wilson_app_version <- "WIlsON basic 2.1.0"
wilson_app_version <- "WIlsON basic 2.1.1"
wilson_package_version <- as.character(packageVersion("wilson"))

#
Expand Down Expand Up @@ -52,12 +52,16 @@ wilson_auto_reload_pattern <- ".*\\.(r|se|R|clarion)$"
wilson_auto_reload_interval <- 3000

# Sets the max file upload size in mb
# This value only changes upload size of the shiny-server preceeding services (e.g. reverse proxy) must be altered aswell.
# This value only changes upload size of the shiny-server. Other services (e.g. a reverse proxy) must be configured properly as well.
wilson_max_upload_size <- 100

# Allow logging of uploaded files for debugging purposes
wilson_log_upload <- TRUE

# Remove example files from data selection
example_files <- c("A_RNAseq_Zhang_2015.se", "B_Methylation_Hautefort_Oncot_2017.se", "C_Proteomics_Worzfeld_MCP_2017.se")
wilson_blacklist_examples <- as.logical(Sys.getenv("WILSON_BLACKLIST_EXAMPLES", unset = FALSE))

#
# WIlsON application logic
#
Expand Down Expand Up @@ -142,7 +146,7 @@ ui <- dashboardPage(header = dashboardHeader(disable = TRUE), sidebar = dashboar
tags$h6("Highlighted Features"),
verbatimTextOutput("filter_h1"),
tags$h3("Global Parameters"),
radioButtons(inputId = "data_origin", label = "Choose data origin:", choices = c("Examples", "Upload")),
radioButtons(inputId = "data_origin", label = "Choose data source:", choices = c("Select from list", "Upload file")),
uiOutput(outputId = "fileLoader"),
bsButton("filter_log_b", label = "Toggle log", style = "default", size = "small"),
hidden(verbatimTextOutput("filter_log"))
Expand Down Expand Up @@ -536,6 +540,11 @@ server <- function(session, input, output) {
# Use all .se and .clarion files specified in data
load <- sapply(list.files(path = "data", pattern = "\\.se$|\\.clarion$"), function(x){ file.path("data", x)})

# Remove example files if requested
if (wilson_blacklist_examples) {
load <- load[setdiff(names(load), example_files)]
}

# check for additional data
if (dir.exists("external_data")) {
# use all .se and .clarion files specified in external_data
Expand Down

0 comments on commit d7911c3

Please sign in to comment.