Skip to content

Commit

Permalink
adding rule to combine coloc info tables #29
Browse files Browse the repository at this point in the history
  • Loading branch information
dariushghasemi committed Dec 4, 2024
1 parent c8b1a52 commit 3bc1149
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
2 changes: 2 additions & 0 deletions workflow/Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ configfile: "conf/config_finemap.yaml"
include: "rules/common.smk"
include: "rules/locus_breaker.smk"
include: "rules/cojo.smk"
include: "rules/coloc.smk"


rule all:
Expand All @@ -24,3 +25,4 @@ rule all:
expand(ws_path("break/{seqid}_loci.csv"), seqid=analytes.seqid),
ws_path("break/collected_loci_excluding_mhc.csv"),
ws_path("cojo/collected_credible_sets.csv"),
ws_path("coloc/master_coloc.txt"),
17 changes: 17 additions & 0 deletions workflow/rules/coloc.smk
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@

rule make_file:
input:
expand(ws_path("cojo/{seqid}.sentinel"), seqid=analytes.seqid),
output:
ofile = ws_path("coloc/master_coloc.txt"),
params:
outdir = config.get("workspace_path")
log:
ws_path("logs/coloc/master_file.log"),
resources:
runtime=lambda wc, attempt: 999 + attempt * 60,
shell:
"""
cat {params.outdir}/cojo/{seqid}/finemaping/*_coloc_info_table.tsv >> {output.ofile}
"""

0 comments on commit 3bc1149

Please sign in to comment.