-
Notifications
You must be signed in to change notification settings - Fork 0
/
global.R
62 lines (47 loc) · 1.69 KB
/
global.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Data maintenance packages
library(purrr)
library(readr)
library(stringr)
library(dplyr)
# Shiny packages
library(jsonlite)
library(plotly)
library(shiny)
library(shinyBS)
library(shinyWidgets)
library(shinyjs)
library(shinyalert)
library(shinyjqui)
library(shinycssloaders)
library(DT)
library(colourpicker)
library(processx)
library(markdown)
library(devtools)
# Python interface packages
library(reticulate)
# MODE-specific packages
library(pmartR)
library(trelliscope)
# Load bioconductor separately
library(limma)
options(shiny.maxRequestSize = 10 * 1024^2)
# source all UI
for (f in Sys.glob("./ui_templates/*.R")) source(f, local = TRUE)
# First, check if this is the MAP Version, or local version of the application
MAP <- ifelse(Sys.getenv("MAP_VERSION") == "1", TRUE, FALSE)
# Second, check if this is a local test version with minio
Minio_Test <- ifelse(Sys.getenv("MINIO_TEST") == "1", TRUE, FALSE)
# Third, check if this is a local test version with redis
Redis_Test <- ifelse(Sys.getenv("REDIS_TEST") == "1", TRUE, FALSE)
# Fourth, have an option for a docker compose local test
Compose_Test <- ifelse(Sys.getenv("COMPOSE_TEST") == "1", TRUE, FALSE)
# use this for all "None selected" options where applicable
NOSELECT_ = "__nullselect__"
# reference warning messages here to keep code clean
WARN_TEXT <- list(
"BAD_GROUP_LENGTH" = "Specified group vector does not have the right number of elements. Needs to have as many columns as your data minus one (the id column)",
"SPECIFY_GROUPS" = "Either you have not correctly specified groups, or your data has not loaded properly"
)
source("UI_helper_functions.R", local=TRUE)
sym_diff <- function(a,b) setdiff(union(a,b), intersect(a,b))