-
Notifications
You must be signed in to change notification settings - Fork 0
/
incov_analyses.R
83 lines (52 loc) · 1.58 KB
/
incov_analyses.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
# analyses in the INCOV cohort
# tools ------
library(plyr)
library(tidyverse)
library(trafo)
library(rlang)
library(soucer)
library(exda)
library(ggpubr)
library(MASS)
library(lmqc)
library(caret)
library(clustTools)
library(doParallel)
library(furrr)
library(igraph)
library(ggnetwork)
library(ggrepel)
library(soucer)
select <- dplyr::select
reduce <- purrr::reduce
explore <- exda::explore
insert_head()
c('./tools/tools.R') %>%
source_all(message = TRUE, crash = TRUE)
# analysis scripts ------
insert_msg('Analysis scripts')
## modeling of serum levels of dopamine sulfate and serotonin
if(file.exists('./cache/incov_neuro.RData')) {
insert_msg('Loading cached INCOV modeling results for serotonin and dopamine')
load('./cache/incov_neuro.RData')
} else {
source_all('./incov scripts/neuro_modeling.R')
}
## modeling for particular metabolites
if(file.exists('./cache/incov_mod.RData')) {
insert_msg('Loading cached INCOV modeling results')
load('./cache/incov_mod.RData')
} else {
source_all('./incov scripts/modeling.R',
message = TRUE, crash = TRUE)
}
## univariable analyses
c('./incov scripts/metabolite_correlation.R',
'./incov scripts/cytokine_correlation.R',
'./incov scripts/correlation.R',
'./incov scripts/mds.R',
'./incov scripts/time_course.R',
'./incov scripts/time_modeling.R') %>%
source_all(message = TRUE, crash = TRUE)
# END -----
insert_tail()