-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·158 lines (107 loc) · 5.26 KB
/
Makefile
File metadata and controls
executable file
·158 lines (107 loc) · 5.26 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
app_name = enviroms
parameters_path = data/enviroms.toml
# change the path to your data path /Users/eber373/Desenvolvimento/enviroms
data_dir = /home/bmeluch/enviroMS_work/example_data
configuration_dir = /home/bmeluch/enviroMS_work/enviroms/configuration
version := $(shell cat .bumpversion.cfg | grep current_version | cut -d= -f2 | tr -d ' ')
stage := $(shell cat .bumpversion.cfg | grep optional_value | cut -d= -f2 | tr -d ' ')
cpu:
pyprof2calltree -k -i $(file)
mem:
mprof run --multiprocess $(script)
mprof plot
major:
@bumpversion major --allow-dirty
minor:
@bumpversion minor --allow-dirty
patch:
@bumpversion patch --allow-dirty
install:
venv/bin/pip3 install --editable .
run:
venv/bin/pip3/enviroMS run_di_workflow $(parameters_path)
pypi:
@python3 setup.py sdist
@twine upload dist/*
docker-push:
@echo corilo/enviroms:$(version)
@docker build --no-cache -t corilo/enviroms:$(version) .
@docker push corilo/enviroms:$(version)
@docker image tag corilo/enviroms:$(version) corilo/enviroms:$(version)
@docker push corilo/enviroms:$(version)
docker-push-im:
@echo alexandriai168/enviroms:$(version)
@docker build --no-cache -t alexandriai168/enviroms:$(version) .
@docker push alexandriai168/enviroms:$(version)
@docker image tag alexandriai168/enviroms:$(version) alexandriai168/enviroms:$(version)
@docker push alexandriai168/enviroms:$(version)
docker-nmdc:
@echo microbiomedata/enviroms:$(version)
@docker buildx create --use
@docker buildx build --platform linux/amd64,linux/arm64 --no-cache -t microbiomedata/enviroms:$(version) --push .
@docker buildx imagetools create microbiomedata/enviroms:$(version) -t microbiomedata/enviroms:$(version)
@docker buildx imagetools inspect microbiomedata/enviroms:$(version)
docker-build:
docker build -t enviroms:local .
docker-build-local:
docker build --pull --no-cache -t local-enviroms:latest .
docker-run-di:
@echo $(data_dir)
@echo $(configuration_dir)
docker run -v $(data_dir):/enviroms/data -v $(configuration_dir):/enviroms/configuration microbiomedata/enviroms:$(version) run_di /enviroms/configuration/di_enviroms.toml
docker-run-di-local:
@make docker-build-local
@echo $(data_dir)
@echo $(configuration_dir)
docker run \
-v $(data_dir):/enviroms/data/raw_data \
-v ./data/output:/enviroms/data/output \
-v ./data/reference:/enviroms/data/reference \
-v $(configuration_dir):/enviroms/configuration \
local-enviroms:latest \
enviroMS run_di /enviroms/configuration/di_enviroms.toml
docker-run-lc:
@echo $(data_dir)
@echo $(configuration_dir)
docker run -v $(data_dir):/enviroms/data -v $(configuration_dir):/enviroms/configuration microbiomedata/enviroms:$(version) run_lc_fticr /enviroms/configuration/lc_fticr/lc_fticr_enviroms.toml
cascade-run:
srun -A mscms -t 240 -N 1 -n time enviroMS run-di -r 2 --mpi /dtemp/mscms/enviroms/data/configuration/enviroms.toml
cli-run-di :
enviroMS run_di configuration/di_enviroms.toml --jobs 1 --replicas 1 --tasks 1
wdl-run-di :
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input.json --verbose --no-cache --copy-input-files
wdl-run-di-local :
@make docker-build-local
miniwdl run wdl/di_fticr_ms.wdl -i wdl/di_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
wdl-run-lc :
miniwdl run wdl/lc_fticr_ms.wdl -i wdl/lc_fticr_wdl_input.json --verbose --no-cache --copy-input-files
wdl-run-lc-local:
miniwdl run wdl/lc_fticr_ms.wdl -i wdl/lc_fticr_wdl_input_local_docker.json --verbose --no-cache --copy-input-files
get-lcms-fticr-test-data:
@echo "Downloading test files for LC-MS FT-ICR workflow"
# download configs
@echo "Downloading configuration files"
@mkdir -p configuration/lc_fticr
@if [ ! -f configuration/lc_fticr/lc_fticr_corems_massspectrum.toml ] || \
[ ! -f configuration/lc_fticr/lc_fticr_corems_mfsearch.toml ] || \
[ ! -f configuration/lc_fticr/lc_fticr_corems_mspeak.toml ] || \
[ ! -f configuration/lc_fticr/lc_fticr_enviroms.toml ]; then \
echo "Some or all config files do not exist, downloading"; \
curl -L -o configuration/lc_fticr/lcms_fticr_test_configs.zip https://nmdcdemo.emsl.pnnl.gov/nom/test_data/enviroms_lcms_nom_test/lcms_fticr_test_configs.zip; \
unzip -j configuration/lc_fticr/lcms_fticr_test_configs.zip -d configuration/lc_fticr/; \
rm configuration/lc_fticr/lcms_fticr_test_configs.zip; \
else echo "Configuration files exist"; fi
# download data
@echo "Checking if test data file exists"
@mkdir -p data/raw_data/lc_fticr
@if [ ! -f ./data/raw_data/lc_fticr/20231109_60885_SRFA_50ppm_5uL_LC_PolarAdv-001262_231109183242.raw ]; \
then echo "Test data file does not exist, downloading"; \
curl -fL --retry 3 --retry-delay 10 --max-time 500 -O --output-dir data/raw_data/lc_fticr https://nmdcdemo.emsl.pnnl.gov/nom/test_data/enviroms_lcms_nom_test/20231109_60885_SRFA_50ppm_5uL_LC_PolarAdv-001262_231109183242.raw; \
else echo "Test data file exists"; fi
# download ref
@echo "Checking if reference file exists"
@mkdir -p data/reference
@if [ ! -f ./data/reference/Hawkes_neg.ref ]; then echo "Reference file does not exist, downloading"; \
curl -L -O --output-dir data/reference/ https://nmdcdemo.emsl.pnnl.gov/nom/test_data/enviroms_lcms_nom_test/Hawkes_neg.ref; \
else echo "Reference file exists"; fi
@echo "LC-MS FT-ICR test files complete"