-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
49 lines (36 loc) · 1.38 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
TARGETS=dependencies dag run unlock
CONDA_ENV_DIR=$(shell dirname ${CONDA_EXE})
HN=$(shell hostname | sed "s/[0-9]//g")
ifeq ($(HN),$(filter $(HN),cnode gnode hnode))
CONDA_ENV_NAME=/exchange/healthds/software/envs/snakemake
else
CONDA_ENV_NAME=snakemake
endif
all:
@echo "Try one of: ${TARGETS}"
dag:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --dag | dot -Tsvg > dag.svg
dependencies:
mamba env update -n snakemake --file environment.yml
dev-dependencies: dependencies
mamba env update -n snakemake --file environment_dev.yml
dry-run:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --sdm conda --dry-run --profile slurm --snakefile workflow/Snakefile #--until collect_loci
pre-commit:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
if [ ! -f .git/hooks/pre-commit ]; then pre-commit install; fi && \
pre-commit run --all-files
run:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --profile slurm --snakefile workflow/Snakefile #--until collect_loci
rerun:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --profile slurm --snakefile workflow/Snakefile --rerun-incomplete
unlock:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --unlock
dockerfile_:
source $(CONDA_ENV_DIR)/activate $(CONDA_ENV_NAME) && \
snakemake --containerize --snakefile workflow/Snakefile > Dockerfile