Skip to content

Commit

Permalink
move env, config, annot export into the result folder to be self-cont…
Browse files Browse the repository at this point in the history
…ained
  • Loading branch information
sreichl committed Sep 13, 2024
1 parent dedeb14 commit 8f5f44d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ rule all:
expand(os.path.join(result_path,'{group}','{tool}','{db}','{group}_{db}_summary.png'),group=regions["group"].unique(), tool='pycisTarget', db=pycistarget_db_dict.keys()),
expand(os.path.join(result_path,'{group}','{tool}','{db}','{group}_{db}_summary.png'),group=list(set(genes["group"].tolist()+regions["group"].tolist())), tool='RcisTarget', db=rcistarget_db_dict.keys()),
# config
envs = expand(os.path.join(config["result_path"],'envs',module_name,'{env}.yaml'),env=['region_enrichment_analysis','gene_enrichment_analysis','visualization','pycisTarget','RcisTarget']),
configs = os.path.join(config["result_path"],'configs',module_name,'{}_config.yaml'.format(config["project_name"])),
annotations = os.path.join(config["result_path"],'configs',module_name,'{}_annot.csv'.format(config["project_name"])),
envs = expand(os.path.join(result_path,'envs','{env}.yaml'),env=['region_enrichment_analysis','gene_enrichment_analysis','visualization','pycisTarget','RcisTarget']),
configs = os.path.join(result_path,'configs','{}_config.yaml'.format(config["project_name"])),
annotations = os.path.join(result_path,'configs','{}_annot.csv'.format(config["project_name"])),
threads: config.get("threads", 1)
resources:
mem_mb=config.get("mem", "16000"),
Expand Down
18 changes: 9 additions & 9 deletions workflow/rules/envs_export.smk
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# one rule per used conda environment to document the exact versions and builds of the used software
rule env_export:
output:
report(os.path.join(config["result_path"],'envs','enrichment_analysis','{env}.yaml'),
report(os.path.join(result_path,'envs','{env}.yaml'),
caption="../report/software.rst",
category="Software",
subcategory="{}_enrichment_analysis".format(config["project_name"])
subcategory="{}_{}".format(config["project_name"], module_name)
),
conda:
"../envs/{env}.yaml"
resources:
mem_mb=1000, #config.get("mem", "16000"),
mem_mb=1000,
threads: config.get("threads", 1)
log:
os.path.join("logs","rules","env_{env}.log"),
Expand All @@ -21,13 +21,13 @@ rule env_export:
# add configuration files to report
rule config_export:
output:
configs = report(os.path.join(config["result_path"],'configs','enrichment_analysis','{}_config.yaml'.format(config["project_name"])),
configs = report(os.path.join(result_path,'configs','{}_config.yaml'.format(config["project_name"])),
caption="../report/configs.rst",
category="Configuration",
subcategory="{}_enrichment_analysis".format(config["project_name"])
subcategory="{}_{}".format(config["project_name"], module_name)
)
resources:
mem_mb=1000, #config.get("mem", "16000"),
mem_mb=1000,
threads: config.get("threads", 1)
log:
os.path.join("logs","rules","config_export.log"),
Expand All @@ -40,13 +40,13 @@ rule annot_export:
input:
config["annotation"],
output:
annot = report(os.path.join(config["result_path"],'configs','enrichment_analysis','{}_annot.csv'.format(config["project_name"])),
annot = report(os.path.join(result_path,'configs','{}_annot.csv'.format(config["project_name"])),
caption="../report/configs.rst",
category="Configuration",
subcategory="{}_enrichment_analysis".format(config["project_name"])
subcategory="{}_{}".format(config["project_name"], module_name)
)
resources:
mem_mb=1000, #config.get("mem", "16000"),
mem_mb=1000,
threads: config.get("threads", 1)
log:
os.path.join("logs","rules","annot_export.log"),
Expand Down

0 comments on commit 8f5f44d

Please sign in to comment.