-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.R
73 lines (56 loc) · 3.17 KB
/
make.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
# make.R
# Master script for running PSYMETAB analyses.
# This project uses drake to manage workflows.
# For more information about drake, see
# https://ropensci.github.io/drake/
# Setup ----
# Set working directory
setwd(here::here())
# Load packages ----
source("code/packages.R")
# Load functions and plans ----
source("code/functions.R")
source("code/settings.R")
source("code/plan.R")
# Create output folders ---
dir.create(plink_bed_out,showWarnings = F)
dir.create("analysis/QC", showWarnings = F)
dir.create("data/processed/phenotype_data/GWAS_input", showWarnings = F)
create_analysis_dirs("analysis/GWAS", eths)
dir.create(plink_output_dir)
create_analysis_dirs(plink_output_dir, eths)
# Run analyses ----
## Run plans with different requirements seperately because the `future` backend is so slow
# make(qc_prep, log_make = "qc_prep.log", cache_log_file = "cache_log.csv")
#
# make(pre_impute_qc, log_make = "pre_impute_qc.log", cache_log_file = "cache_log.csv",
# parallelism = "clustermq", jobs = 1, template = list(cpus = 16, partition = "sgg",
# log_file = "/data/sgg2/jenny/projects/PSYMETAB/pre_impute_qc_%a_clustermq.out"))
#
# ### download files and impute on Michigan server
#
# make(download_impute, log_make = "download_impute.log", cache_log_file = "cache_log.csv",
# parallelism = "clustermq", jobs = 1, template = list(cpus = 11, partition = "sgg",
# log_file = "/data/sgg2/jenny/projects/PSYMETAB/download_impute_%a_clustermq.out"))
#
# make(post_impute, log_make = "post_impute.log", cache_log_file = "cache_log.csv",
# parallelism = "clustermq", jobs = 1, template = list(cpus = 16, partition = "cluster",
# log_file = "/data/sgg2/jenny/projects/PSYMETAB/post_impute_%a_clustermq.out"))
make(analysis_prep, log_make = "analysis_prep.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 40, template = list(cpus = 1, partition = "cluster",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/analysis_prep_%a_clustermq.out"))
make(init_analysis, log_make = "init_analysis.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 20, template = list(cpus = 8, partition = "cluster",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/init_analysis_%a_clustermq.out"))
make(process_init, log_make = "process_init.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 125, template = list(cpus = 1, partition = "sgg",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/process_init_%a_clustermq.out"))
make(ukbb_analysis, log_make = "ukbb_analysis.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 22, template = list(cpus = 1, partition = "cluster",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/ukbb_analysis_%a_clustermq.out"))
make(extract_sig, log_make = "extract_sig.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 120, template = list(cpus = 1, partition = "sgg",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/process_init_%a_clustermq.out"))
make(prs, log_make = "prs.log", cache_log_file = "cache_log.csv",
parallelism = "clustermq", jobs = 8, template = list(cpus = 1, partition = "sgg",
log_file = "/data/sgg2/jenny/projects/PSYMETAB/prs_%a_clustermq.out"))