-
Notifications
You must be signed in to change notification settings - Fork 0
/
dge.R
80 lines (56 loc) · 1.82 KB
/
dge.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
# Differential gene expression between the lymphokine clusters
#
# 1) Differentially regulated genes (all and exhaustion-related) are identified
# by two-tailed FDR-corrected T test and at least 1.5-fold regulation between
# the clusters
#
# 2) GO enrichment for the differentially regulated genes.
#
# 3) Differential gene expression for the selected functional groups of genes
# tools --------
library(plyr)
library(tidyverse)
library(exda)
library(trafo)
library(soucer)
library(rlang)
library(microViz)
library(ggrepel)
library(ggtext)
library(furrr)
library(clustTools)
library(readxl)
library(limma)
library(SPIA)
extract <- clustTools::extract
nobs <- clustTools::nobs
reduce <- purrr::reduce
select <- dplyr::select
insert_head()
c('./tools/project_globals.R',
'./tools/project_tools.R') %>%
source_all(message = TRUE, crash = TRUE)
# differential gene expression scripts -------
insert_msg('Differential gene expression scripts')
## serial testing is time costly and done via cache
if(file.exists('./cache/dge.RData')) {
load('./cache/dge.RData')
} else {
source_all('./dge scripts/expression.R',
message = TRUE, crash = TRUE)
}
c('./dge scripts/plots.R',
'./dge scripts/go.R',
'./dge scripts/exhaustion.R',
'./dge scripts/interferon.R',
'./dge scripts/il9_21.R') %>%
source_all(message = TRUE, crash = TRUE)
## SPIA results from the cache (extremely computation intensive)
if(file.exists('./cache/spia.RData')) {
load('./cache/spia.RData')
} else {
source_all('./dge scripts/spia.R',
message = TRUE, crash = TRUE)
}
# END --------
insert_tail()