-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcharacteristic.R
119 lines (84 loc) · 3.26 KB
/
characteristic.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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Characteristic of the collagen clusters
# tools --------
library(tidyverse)
library(rlang)
library(trafo)
library(stringi)
library(clustTools)
library(microViz)
library(exda)
library(limma)
library(decoupleR)
library(SPIA)
library(biggrExtra)
library(org.Hs.eg.db)
library(AnnotationDbi)
library(GOSemSim)
library(survival)
library(survminer)
library(pathview)
library(furrr)
library(soucer)
explore <- exda::explore
select <- dplyr::select
reduce <- purrr::reduce
set_rownames <- trafo::set_rownames
extract <- clustTools::extract
insert_head()
c('./tools/globals.R',
'./tools/functions.R') %>%
source_all(message = TRUE, crash = TRUE)
# Analysis globals -------
insert_msg('Analysis globals')
source_all('./characteristic scripts/globals.R',
message = TRUE, crash = TRUE)
# Clinical characteristic and survival -------
insert_msg('Clinical characteristic and survival')
c('./characteristic scripts/clinic.R',
'./characteristic scripts/os.R',
'./characteristic scripts/rfs.R') %>%
source_all(message = TRUE, crash = TRUE)
# Immunity -------
insert_msg('Immunity and microenvironment')
c('./characteristic scripts/xcell.R',
'./characteristic scripts/mcp_counter.R') %>%
source_all(message = TRUE, crash = TRUE) %>%
print
# Differential gene expression, biology and signaling --------
insert_msg('Biology and differential gene expression')
## gene set variation analyses
c('./characteristic scripts/reactome.R',
'./characteristic scripts/recon.R') %>%
source_all(message = TRUE, crash = TRUE)
## analyses based on differential gene expression
list(cache_path = c('./cache/ana_dge.RData',
'./cache/ana_spia.RData',
'./cache/ana_go.RData',
'./cache/ana_meta.RData'),
script_path = c('./characteristic scripts/dge.R',
'./characteristic scripts/spia.R',
'./characteristic scripts/go.R',
'./characteristic scripts/metabolism.R'),
message = c('Cached differential gene expression analysis',
'Cached signaling pathway analysis with SPIA',
'Cached GO enrichment results',
'Cached Monte Carlo modeling of metabolic reactions')) %>%
pwalk(access_cache)
## decoupleR analyses
c('./characteristic scripts/progeny.R',
'./characteristic scripts/collectri.R') %>%
source_all(message = TRUE, crash = TRUE)
## visualization of the differential gene expression, signaling
## and metabolic modeling
c('./characteristic scripts/dge_plots.R',
'./characteristic scripts/pathview.R',
'./characteristic scripts/metabolism_plots.R',
'./characteristic scripts/metabolic_genes.R') %>%
source_all(message = TRUE, crash = TRUE)
# Mutations ------
insert_msg('Differences in mutation counts and rates')
c('./characteristic scripts/tmb.R',
'./characteristic scripts/mutations.R') %>%
source_all(message = TRUE, crash = TRUE)
# END ------
insert_tail()