-
Notifications
You must be signed in to change notification settings - Fork 2
/
Snakefile
58 lines (49 loc) · 1.89 KB
/
Snakefile
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
configfile: workflow.current_basedir + "/config.yaml"
##### Configuration #####
if config.get("output_path"):
config["output_path"] = config["output_path"].rstrip('/')
if config.get("publish_path"):
config["publish_path"] = config["publish_path"].rstrip('/')
config["publish_path"] = os.path.abspath(config["publish_path"])
if config.get("export_path"):
config["export_path"] = config["export_path"].rstrip('/')
config["export_path"] = os.path.abspath(config["export_path"])
if not config.get("date"):
cwd = os.getcwd()
config["date"] = os.path.basename(cwd)[:10]
##### Target rules #####
rule all:
input:
config["output_path"] + "/logs/6_summarize_publish.log"
config["output_path"] + "/logs/5_summarize_generate_report_and_cut_out_trees.log",
config["output_path"] + "/logs/4_summarize_make_trees.log",
config["output_path"] + "/logs/3_summarize_combine_gisaid_and_cog.log",
config["output_path"] + "/logs/2_summarize_pangolin_lineage_typing.log",
config["output_path"] + "/logs/1_summarize_preprocess_uk.log",
config["output_path"] + "/logs/0_gisaid_summarize_preprocess.log",
config["output_path"] + "/snakejunk/all"
rule clean_up:
input:
config["output_path"] + "/logs/6_summarize_publish.log",
output:
config["output_path"] + "/snakejunk/all"
shell:
"""
mkdir -p {output}
mv slurm-*.out *_data.json {output}/
for file in pre trace default.profraw
do
if [ -f "$file" ]
then
rm $file
fi
done
"""
##### Modules #####
include: "rules/0_preprocess_gisaid.smk"
include: "rules/1_preprocess_uk.smk"
include: "rules/2_pangolin_lineage_typing.smk"
include: "rules/3_combine_gisaid_and_uk.smk"
include: "rules/4_make_trees.smk"
include: "rules/5_generate_report_and_cut_out_trees.smk"
include: "rules/6_publish.smk"