-
Notifications
You must be signed in to change notification settings - Fork 1
/
preload.R
executable file
·71 lines (58 loc) · 3.15 KB
/
preload.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
62
63
64
65
66
67
68
69
70
# Pre-load packages and data when this App is started
.libPaths("/home/zhangz/R/x86_64-pc-linux-gnu-library/3.3");
#APP_HOME <- "/srv/shiny-server/rnaseq2g_dev";
APP_HOME <- "/srv/shiny-server/rnaseq2g";
require(XML);
require(readxl);
require(shinythemes);
require(plotly);
require(RoCA);
require(rchive);
require(awsomics);
require(DEGandMore);
# Loading housekeeping data and custom function
fn <- paste(APP_HOME, 'source', dir(paste(APP_HOME, 'source', sep='/')), sep='/');
fnc <- sapply(fn, function(fn) if (gregexpr('\\.R$', fn, ignore.case=TRUE)>0) source(fn));
ncls <- 2;
count_example <- readRDS(paste(APP_HOME, 'data/count_example.rds', sep='/'));
group_example <- list(Control=colnames(count_example)[1:3], Patient=colnames(count_example)[4:6]);
data(DeMethodMeta);
DeRNAseqMs <- DeMethodMeta;
# rnaseq2g.method.checkbox(DeRNAseqMs[, 1]);
method.group <- c('None', 'Default', 'Fast', 'Fast + Medium', 'Fast + Mediumn + Slow', 'All');
norm.count <- as.character(as.list(args(DeRNAseq))$norm.count)[-1];
norm.logged <- as.character(as.list(args(DeRNAseq))$norm.logged)[-1];
meta.method <- list(Simes='simes', Average='average', Bonferroni='bonferroni', Max='max', Min='min');
plot.type <- list('Pvalue'=1, 'FDR'=2, 'Volcano'=3, 'M-A'=4, 'P-A'=5);
button.style <- "font-family: Courier New; color: #fff; background-color: tomato; border-color: black";
button.style2 <- "font-family: Courier New; color: #fff; background-color: chocolate; border-color: black";
choices.pv <- list('1' = 1, '0.5' = 0.5, '0.25' = 0.25, '0.10' = 0.1, '0.05' = 0.05, '0.01' = 0.01, '0.001' = 0.001);
choices.fc <- list('None' = 0, '5%' = log2(1.05), '10%' = log2(1.1), '25%' = log2(1.25), '50%' = log2(1.5), '100%' = 1,
'200%' = log2(3), '400%' = 2, '800%' = 3);
##########################################################################################################
# datatable options
dt.options1 <- list(
dom = 't', scrollX = TRUE,
initComplete = DT::JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#888', 'color': '#fff'});",
"}"));
dt.options2 <- list(
dom = 't', scrollX = FALSE, pageLength = 100,
initComplete = DT::JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#888', 'color': '#fff'});",
"}"));
dt.options3 <- list(
scrollX = TRUE, pageLength = 10,
initComplete = DT::JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#888', 'color': '#fff'});",
"}"));
dt.options4 <- list(
dom = 't', scrollX = TRUE, pageLength = 100,
initComplete = DT::JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#888', 'color': '#fff'});",
"}"));
dt.options5 <- list(
scrollX = TRUE, pageLength = 12,
initComplete = DT::JS("function(settings, json) {",
"$(this.api().table().header()).css({'background-color': '#888', 'color': '#fff'});",
"}"));