Skip to content
Snippets Groups Projects
Commit 9b626476 authored by Manavalan Gajapathy's avatar Manavalan Gajapathy
Browse files

removes globbing for multiple samples - fixes #34

parent 51c10929
No related branches found
No related tags found
1 merge request!3Accept only-one-sample per project as input to QuaC
...@@ -124,13 +124,11 @@ rule mosdepth_plot: ...@@ -124,13 +124,11 @@ rule mosdepth_plot:
protected(OUT_DIR / "project_level_qc" / "mosdepth" / "mosdepth.html"), protected(OUT_DIR / "project_level_qc" / "mosdepth" / "mosdepth.html"),
message: message:
"Running mosdepth plotting" "Running mosdepth plotting"
params:
infiles=lambda wildcards: str(OUT_DIR / f"{{{','.join(SAMPLES)}}}" / "qc" / "mosdepth" / "*.mosdepth.global.dist.txt"),
shell: shell:
r""" r"""
python {input.script} \ python {input.script} \
--output {output} \ --output {output} \
{params.infiles} {input.dist}
""" """
......
...@@ -41,14 +41,13 @@ rule somalier_relate: ...@@ -41,14 +41,13 @@ rule somalier_relate:
log=OUT_DIR / "project_level_qc" / "somalier" / "relatedness" / "somalier.log", log=OUT_DIR / "project_level_qc" / "somalier" / "relatedness" / "somalier.log",
params: params:
outdir=lambda wildcards, output: Path(output["out"][0]).parent, outdir=lambda wildcards, output: Path(output["out"][0]).parent,
infiles=lambda wildcards: str(OUT_DIR / "project_level_qc" / "somalier" / "extract" / f"{{{','.join(SAMPLES)}}}.somalier"),
shell: shell:
r""" r"""
somalier relate \ somalier relate \
--ped {input.ped} \ --ped {input.ped} \
--infer \ --infer \
--output-prefix {params.outdir}/somalier \ --output-prefix {params.outdir}/somalier \
{params.infiles} \ {input.extracted} \
> {log} 2>&1 > {log} 2>&1
""" """
...@@ -73,13 +72,12 @@ rule somalier_ancestry: ...@@ -73,13 +72,12 @@ rule somalier_ancestry:
log=OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.log", log=OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.log",
params: params:
outdir=lambda wildcards, output: Path(output["out"][0]).parent, outdir=lambda wildcards, output: Path(output["out"][0]).parent,
infiles=lambda wildcards: str(OUT_DIR / "project_level_qc" / "somalier" / "extract" / f"{{{','.join(SAMPLES)}}}.somalier"),
shell: shell:
r""" r"""
somalier ancestry \ somalier ancestry \
--output-prefix {params.outdir}/somalier \ --output-prefix {params.outdir}/somalier \
--labels {input.labels_1kg} \ --labels {input.labels_1kg} \
{input.somalier_1kg_directory}/*.somalier ++ \ {input.somalier_1kg_directory}/*.somalier ++ \
{params.infiles} \ {input.extracted} \
> {log} 2>&1 > {log} 2>&1
""" """
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment