-
Notifications
You must be signed in to change notification settings - Fork 0
/
Snakefile
39 lines (29 loc) · 1005 Bytes
/
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
import os
# Construct paths relative to the working directory
snakefile_dir = workflow.basedir
current_working_directory = os.getcwd()
config_path = os.path.join(snakefile_dir, "config.yaml")
subsampling_snakefile_path = os.path.join(snakefile_dir, "Subsampling_snakefile")
analysis_snakefile_path = os.path.join(snakefile_dir, "Analysis_snakefile")
configfile: config_path
num_cores = config["num_cores"]
data_folder = config["data_folder"]
module subsampling:
snakefile:
subsampling_snakefile_path
config:
config
rule this_all:
input:
"run_analysis.done"
rule run_analysis:
input:
data_folder+"/convert_input_to_fasta.done"
output:
temp(touch("run_analysis.done"))
shell:
"""
snakemake --snakefile {analysis_snakefile_path} -d {current_working_directory} --cores {num_cores}
rm {current_working_directory}/{data_folder}/convert_input_to_fasta.done
"""
use rule * from subsampling as subsampling_*