Skip to content

Commit

Permalink
add rule
Browse files Browse the repository at this point in the history
  • Loading branch information
gmauro committed Apr 13, 2024
1 parent 3fe0060 commit a3462ce
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions workflow/rules/summarize.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
rule summarize_sumstats:
input:
ws_path("pickle/{seqid}.pkl"),
output:
temp(ws_path("if/{seqid}.if.txt")),
temp(ws_path("min_P/{seqid}.nlargest.txt")),
ws_path("plots/{seqid}.png"),
conda:
"../scripts/gwaspipe/environment.yml"
params:
format=config.get("params").get("summarize_sumstats").get("input_format"),
config_file=config.get("params").get("summarize_sumstats").get("config_file"),
output_path=config.get("workspace_path"),
resources:
runtime=lambda wc, attempt: attempt * 60,
shell:
"python workflow/scripts/gwaspipe/src/gwaspipe.py "
"-f {params.format} "
"-c {params.config_file} "
"-i {input} "
"-o {params.output_path}"


rule create_if_table:
input:
expand(ws_path("if/{seqid}.if.txt"), seqid=analytes.seqid),
output:
ws_path("inflation_factors_table.tsv"),
conda:
"../envs/create_report_table.yaml"
params:
input_path=ws_path("if"),
shell:
"python workflow/scripts/create_report_table.py -i {params.input_path} -o {output}"


rule create_min_pvalue_table:
input:
expand(ws_path("min_P/{seqid}.nlargest.txt"), seqid=analytes.seqid),
output:
ws_path("min_pvalue_table.tsv"),
conda:
"../envs/create_report_table.yaml"
params:
input_path=ws_path("min_P"),
shell:
"python workflow/scripts/create_report_table.py -i {params.input_path} -o {output}"

0 comments on commit a3462ce

Please sign in to comment.