-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
app.R
91 lines (84 loc) · 2.64 KB
/
app.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
library(teal.modules.hermes)
library(teal.modules.general)
options(shiny.useragg = FALSE)
## Data reproducible code ----
data <- teal_data()
data <- within(data, {
library(nestcolor)
library(random.cdisc.data)
ADSL <- radsl(seed = 1)
ADTTE <- radtte(ADSL, seed = 1) %>%
dplyr::mutate(is_event = CNSR == 0)
MAE <- hermes::multi_assay_experiment
})
datanames(data) <- c("ADTTE", "MAE")
## App header and footer ----
nest_logo <- "https://raw.githubusercontent.com/insightsengineering/hex-stickers/main/PNG/nest.png"
app_source <- "https://github.com/insightsengineering/teal.gallery/tree/main/RNA-seq"
gh_issues_page <- "https://github.com/insightsengineering/teal.gallery/issues"
header <- tags$span(
style = "display: flex; align-items: center; justify-content: space-between; margin: 10px 0 10px 0;",
tags$span("My first teal app", style = "font-size: 30px;"),
tags$span(
style = "display: flex; align-items: center;",
tags$img(src = nest_logo, alt = "NEST logo", height = "45px", style = "margin-right:10px;"),
tags$span(style = "font-size: 24px;", "NEST @ Roche")
)
)
footer <- tags$p(
"This teal app is brought to you by the NEST Team at Roche/Genentech.
For more information, please visit:",
tags$a(href = app_source, target = "_blank", "Source Code"), ", ",
tags$a(href = gh_issues_page, target = "_blank", "Report Issues")
)
app <- init(
data = data,
title = build_app_title("RNA-Seq Analysis Teal Demo App", nest_logo),
header = header,
footer = footer,
modules = modules(
tm_front_page(
label = "App Info",
header_text = c("Info about input data source" = "This app uses MultiplAssayExperiment data object randomly generated by `random.cdisc.data` & `hermes` R packages"), # nolint: line_length.
tables = list(`NEST packages used in this demo app` = data.frame(
Packages = c("teal.modules.hermes", "teal.modules.general", "random.cdisc.data", "hermes")
))
),
tm_g_quality(
label = "Quality Control",
mae_name = "MAE"
),
tm_g_pca(
label = "PCA plot",
mae_name = "MAE"
),
teal.modules.hermes::tm_g_scatterplot(
label = "Scatterplot",
mae_name = "MAE"
),
tm_g_boxplot(
label = "Boxplot",
mae_name = "MAE"
),
tm_g_barplot(
label = "Barplot",
mae_name = "MAE"
),
tm_g_volcanoplot(
label = "Volcanoplot",
mae_name = "MAE"
),
tm_g_forest_tte(
label = "Forestplot",
adtte_name = "ADTTE",
mae_name = "MAE"
),
tm_g_km(
label = "Kaplan-Meier",
adtte_name = "ADTTE",
mae_name = "MAE"
)
)
)
## Not run:
shinyApp(app$ui, app$server)