-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (48 loc) · 1.78 KB
/
Makefile
File metadata and controls
62 lines (48 loc) · 1.78 KB
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
# for non-make users:
# general syntax is
#
# target: dependency1 dependency2 ...
# commands run in the terminal
#
# target & dependencies being files
# in general, this repo follows a paradigm of listing code file as first dependency,
# followed by inputs files to that code
# reference definitions; optionally create a local.makefile to overide
# REFDIR & FIGFMT; can also specify in invocation, e.g. `make sometarget FIGFMT=jpg`
-include makefiles/local.makefile
include makefiles/paths.makefile
default: all
all: support inputs rt mobility susceptible thresholds figures sessioninfo
# automates some setup tasks & provides convenience definitions
# particular, provides definition of R such that:
# $(call R) = Rscript [dependencies] [target]
# $(call R,${THING}) = Rscript [dependencies] ${THING} [target]
include makefiles/support.makefile
support: dirs
# details for formatting input data
include makefiles/inputs.makefile
inputs: ${INS} ${INDIR}/susceptibility.rds ${DATADIR}/sgtf.rds
include makefiles/sgtf.makefile
sgtf: sgtfensembling
# details for estimating Rt, ratios figures etc
include makefiles/rt.makefile
rt: omiratios
# details for getting contact matrix adjustments
include makefiles/mobility.makefile
mobility: ${MOB}
# details for analyses using the estimates derived in previous steps
include makefiles/susceptible.makefile
susceptible: ${INDIR}/susceptibility.rds ${OUTDIR}/ngm_ratios.rds
# details for calculating the transmissibillity/immune escape thresholds
include makefiles/thresholds.makefile
thresholds: ${OUTDIR}/thresholds.rds
include makefiles/figures.makefile
figures: figs
# generate sessioninfo when running make
.PHONY: sessioninfo
sessioninfo:
Rscript R/sessioninfo.R
# get a list of all available targets
.PHONY: list
list:
grep "^[^#[:space:]].*:" Makefile