Repository navigation
Expand file tree
/
Copy pathSnakefile
More file actions
66 lines (53 loc) · 1.46 KB
/
Copy pathSnakefile
File metadata and controls
66 lines (53 loc) · 1.46 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
include: 'workflow/utils/functions.smk'
include: 'workflow/setup/setup.smk'
import os
JAVA_TEMP_DIR = config.get("params", {}).get("java", {}).get("temp_directory", "tmp/java")
os.makedirs(JAVA_TEMP_DIR, exist_ok=True)
VALID_RUN_TYPES = [
"wes",
"wgs",
"rna",
"build_b37",
"build_hg38",
"pull_zenodo"
]
RUN_TYPE = config.get("run_type", None)
if RUN_TYPE is None or RUN_TYPE == "":
raise ValueError(
"Missing required config parameter: run_type.\n"
f"Please set config['run_type'] to one of: {', '.join(VALID_RUN_TYPES)}\n"
"Example in config.yaml:\n"
"run_type: wes"
)
if RUN_TYPE not in VALID_RUN_TYPES:
raise ValueError(
f"Invalid config['run_type']: {RUN_TYPE}\n"
f"Valid choices are: {', '.join(VALID_RUN_TYPES)}"
)
if RUN_TYPE == 'wes':
include: 'wrapper/wes.smk'
rule all:
input:
rules.wes_pipeline.input
elif RUN_TYPE == 'wgs':
include: 'wrapper/wgs.smk'
rule all:
input:
rules.wgs_pipeline.input
elif RUN_TYPE == 'rna':
include: 'wrapper/rna.smk'
rule all:
input:
rules.rna_pipeline.input
elif RUN_TYPE == 'build_b37':
rule all:
input:
rules.build_b37_ref.input
elif RUN_TYPE == 'pull_zenodo':
rule all:
input:
rules.download_zenodo_containers.output
elif RUN_TYPE == 'build_hg38':
rule all:
input:
rules.build_hg38_ref.input