Skip to content

Commit

Permalink
add delivery
Browse files Browse the repository at this point in the history
  • Loading branch information
gmauro committed Apr 13, 2024
1 parent e867698 commit dc30c8b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ run:
harmonization: True
annotation: True
summarize: True
delivery: True
tiledb: False
ldscore: False
metal: False
Expand All @@ -11,7 +12,7 @@ run:

# paths
sumstats_path: config/seqid_from_literature.tsv
#dest_path: "/path/to/final/destination"
dest_path: "/exchange/healthds/destination"
workspace_path: "results"

sumstat:
Expand Down
5 changes: 5 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ include: "rules/annotation.smk"
include: "rules/summarize.smk"


if config.get("run").get("delivery"):

include: "rules/delivery.smk"


if config.get("run").get("metal"):

include: "rules/metal.smk"
Expand Down
4 changes: 4 additions & 0 deletions workflow/rules/common.smk
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def get_final_output():
final_output.append(ws_path("min_pvalue_table.tsv")),
final_output.append(ws_path("inflation_factors_table.tsv"))

if config.get("run").get("delivery"):
final_output.append(dst_path("min_pvalue_table.tsv")),
final_output.append(dst_path("inflation_factors_table.tsv"))

if config.get("run").get("annotation"):
final_output.extend(
expand(
Expand Down
13 changes: 13 additions & 0 deletions workflow/rules/delivery.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rule move_to_destination:
input:
table_minp=ws_path("min_pvalue_table.tsv"),
table_if=ws_path("inflation_factors_table.tsv"),
output:
table_minp=dst_path("min_pvalue_table.tsv"),
table_if=dst_path("inflation_factors_table.tsv"),
resources:
runtime=lambda wc, attempt: attempt * 120,
shell:
"""
rsync -rlptoDvz {input.table_minp} {output.table_minp} && \
rsync -rlptoDvz {input.table_if} {output.table_if}"""

0 comments on commit dc30c8b

Please sign in to comment.