-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnakefile.master
51 lines (38 loc) · 1.36 KB
/
snakefile.master
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
#----------------------------------------------------
# Setup
#----------------------------------------------------
import sys
# import custom functions
sys.path.insert(0, Path(workflow.basedir).parent.as_posix())
import Scripts.Functions.functions as func
# Define paths to different Snakefiles
pipelines = {
"annotate": f"{workflow.basedir}/snakefile.annotate",
"benchmark": f"{workflow.basedir}/snakefile.benchmark",
"pretrain": f"{workflow.basedir}/snakefile.pretrain"
}
# Get the mode from the config
mode = config["mode"]
if mode not in pipelines:
print(f"Error: Invalid mode '{mode}' specified.")
sys.exit(1)
if mode == "benchmark":
# In the benchmarking the finish output should be in the reference directory
func.set_benchmark_directory(config,mode = 'benchmarking')
def output_all_function():
return [
f"{output_dir_benchmark}/{reference}/benchmark.finished.succesfully.txt"
for reference in config['references'].keys()
for output_dir_benchmark in [config["references"][reference]["output_dir_benchmark"]]
]
file_output = output_all_function()
else:
file_output = config['output_dir'] + f"/{mode}.finished.succesfully.txt"
rule all:
input:
file_output
#rule all:
# input:
# config['output_dir'] + f"/{mode}.finished.succesfully.txt"
# Include the selected Snakefile
include: pipelines[mode]