forked from MIT-LCP/mimic-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
107 lines (81 loc) · 3.94 KB
/
Makefile
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
## ------------------------------------------------------------------
## Title: Top-level build file
## Description: Automated import of data and SQL scripts
## ------------------------------------------------------------------
## Parameters ##
DBNAME=mimic
DBUSER=mimic
SCHEMA=mimiciii
DATADIR=
## Commands ##
PSQL=psql "dbname=$(DBNAME) options=--search_path=$(SCHEMA)" --username=$(DBUSER)
## Export ##
# Parameters given in this Makefile take precedence over those defined in each
# individual Makefile (due to specifying the -e option and the export command
# here)
export
## Build targets ##
help:
@echo '---------------------------------------------------------------------------'
@echo 'mimic: Import data'
@echo 'extra: Create community contributed materialzed views'
@echo ' '
@echo 'extra includes:'
@echo ' etc: Miscellaneous staging scripts for useful clinical concepts'
@echo ' firstday: Miscellaneous scripts for concepts on day 1 of an admission'
@echo ' comorbidity: Comorbidity scores'
@echo ' sepsis: Sepsis scores'
@echo ' severityscores: Severity scores'
@echo ' '
@echo '--------------------------------------------------------------------------- '
@echo ' Download MIMIC-III from PhysioNet to the /path/to/data/ directory - '
@echo ' '
@echo ' make mimic-download physionetuser=USERNAME datadir="/path/to/data/" '
@echo ' '
@echo ' e.g. make mimic-download [email protected] datadir="/data/" '
@echo ' '
@echo ' Build MIMIC-III using the CSV files in the /path/to/data directory - '
@echo ' '
@echo ' make mimic datadir="/path/to/data/" '
@echo ' '
@echo ' e.g. make mimic datadir="/data/mimic/v1_4/" '
@echo ' '
@echo ' Build MIMIC-III using the .csv.gz files in the /path/to/data directory - '
@echo ' '
@echo ' make mimic-gz datadir="/path/to/data/" '
@echo ' '
@echo ' e.g. make mimic-gz datadir="/data/mimic/v1_4/" '
@echo '--------------------------------------------------------------------------- '
mimic: mimic-build mimic-check
mimic-gz: mimic-build-gz mimic-check-gz
mimic-download:
@$(MAKE) -e -C buildmimic/postgres mimic-download
mimic-build:
@$(MAKE) -e -C buildmimic/postgres mimic-build
mimic-check:
@$(MAKE) -e -C buildmimic/postgres mimic-check
mimic-build-gz:
@$(MAKE) -e -C buildmimic/postgres mimic-build-gz
mimic-check-gz:
@$(MAKE) -e -C buildmimic/postgres mimic-check-gz
extra: comorbidity demographics sepsis severityscores
## Individual build targets ##
etc:
@$(MAKE) -e -C etc extra
comorbidity: etc
@$(MAKE) -e -C comorbidity/postgres extra
demographics: etc
@$(MAKE) -e -C demographics/postgres extra
sepsis: etc
@$(MAKE) -e -C sepsis extra
severityscores: etc
@$(MAKE) -e -C severityscores extra
## Clean ##
clean:
@$(MAKE) -e -C buildmimic/postgres clean
@$(MAKE) -e -C etc clean
@$(MAKE) -e -C comorbidity/postgres clean
@$(MAKE) -e -C demographics/postgres clean
@$(MAKE) -e -C sepsis clean
@$(MAKE) -e -C severityscores clean
.PHONY: help mimic mimic-build mimic-download mimic-check mimic-gz mimic-build-gz mimic-check-gz extra etc comorbidity demographics sepsis severityscores