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

refactors expand

parent 4fa89fef
No related branches found
No related tags found
1 merge request!2QC under one umbrella (well mostly) under QuaC
......@@ -53,20 +53,20 @@ rule all:
OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.somalier-ancestry.html",
##### coverage #####
# samtools
expand(str(OUT_DIR / "{sample}" / "qc" / "samtools-stats" / "{sample}.txt"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "samtools-stats" / "{sample}.txt", sample=SAMPLES),
# qualimap
expand(str(OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "qualimapReport.html"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "qualimapReport.html", sample=SAMPLES),
# mosdepth
expand(str(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt", sample=SAMPLES),
OUT_DIR / "project_level_qc" / "mosdepth" / "mosdepth.html",
# indexcov and covviz
WGS_ONLY_COVERAGE_TARGETS,
##### cross-sample contamination #####
# verifyBamID
expand(str(OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.Ancestry"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.Ancestry", sample=SAMPLES),
##### VCF stats #####
# bcftools
expand(str(OUT_DIR / "{sample}" / "qc" / "bcftools-stats" / "{sample}.bcftools.stats"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "bcftools-stats" / "{sample}.bcftools.stats", sample=SAMPLES),
##### results aggregation #####
expand(str(OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc.html"), sample=SAMPLES),
expand(OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc.html", sample=SAMPLES),
OUT_DIR / "project_level_qc" / "multiqc" / "multiqc_report.html",
......@@ -133,8 +133,8 @@ rule multiqc_aggregation_all_samples:
# using custom rename config file
extra=(
lambda wildcards, input: f'--config {input.multiqc_config} \
--sample-names {input.rename_config} \
--cl_config "max_table_rows: 2000"'
--sample-names {input.rename_config} \
--cl_config "max_table_rows: 2000"'
),
wrapper:
"0.64.0/bio/multiqc"
......@@ -71,7 +71,7 @@ rule mosdepth_coverage:
rule mosdepth_plot:
input:
dist=expand(str(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt"), sample=SAMPLES),
dist=expand(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt", sample=SAMPLES),
script=WORKFLOW_PATH / "src/mosdepth/v0.3.1/plot-dist.py",
output:
OUT_DIR / "project_level_qc" / "mosdepth" / "mosdepth.html",
......@@ -94,11 +94,11 @@ rule mosdepth_plot:
rule indexcov:
input:
bam=expand(
str(PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam"),
PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam",
sample=SAMPLES,
),
bam_index=expand(
str(PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam.bai"),
PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam.bai",
sample=SAMPLES,
),
output:
......
......@@ -26,11 +26,11 @@ rule somalier_extract:
rule somalier_relate:
input:
extracted=expand(str(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier"), sample=SAMPLES),
extracted=expand(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier", sample=SAMPLES),
ped=PEDIGREE_FPATH,
output:
out=expand(
str(OUT_DIR / "project_level_qc" / "somalier" / "relatedness" / "somalier.{ext}"),
OUT_DIR / "project_level_qc" / "somalier" / "relatedness" / "somalier.{ext}",
ext=["html", "pairs.tsv", "samples.tsv"],
),
message:
......@@ -57,12 +57,12 @@ rule somalier_relate:
rule somalier_ancestry:
input:
extracted=expand(str(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier"), sample=SAMPLES),
extracted=expand(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier", sample=SAMPLES),
labels_1kg=config["somalier"]["labels_1kg"],
somalier_1kg=directory(config["somalier"]["somalier_1kg"]),
output:
out=expand(
str(OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.somalier-ancestry.{ext}"),
OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.somalier-ancestry.{ext}",
ext=["html", "tsv"],
),
message:
......
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