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

adds protected tags - #9

parent 5670cf16
No related branches found
No related tags found
1 merge request!2QC under one umbrella (well mostly) under QuaC
......@@ -10,10 +10,10 @@ rule multiqc_by_sample_initial_pass:
multiqc_config="configs/multiqc_config.yaml",
rename_config=PROJECT_PATH / "{sample}" / "qc" / "multiqc_initial_pass" / "multiqc_sample_rename_config" / "{sample}_rename_config.tsv",
output:
OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc.html",
OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_general_stats.txt",
OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_fastqc_trimmed.txt",
OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_fastq_screen.txt",
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc.html"),
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_general_stats.txt"),
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_fastqc_trimmed.txt"),
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_fastq_screen.txt"),
# WARNING: don't put this rule in a group, bad things will happen. see issue #23 in gitlab (small var caller pipeline repo)
message:
"Aggregates QC results using multiqc. First pass. Output will be used for the internal QC checkup. Sample: {wildcards.sample}"
......@@ -33,10 +33,10 @@ rule qc_checkup:
fastq_screen=OUT_DIR / "{sample}" / "qc" / "multiqc_initial_pass" / "{sample}_multiqc_data" / "multiqc_fastq_screen.txt",
qualimap=OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "genome_results.txt",
output:
expand(
protected(expand(
OUT_DIR / "{{sample}}" / "qc" / "qc_checkup" / "qc_checkup_{suffix}.yaml",
suffix=["overall_summary", "fastqc", "fastq_screen", "qualimap_overall", "qualimap_chromosome_stats"],
),
)),
# WARNING: don't put this rule in a group, bad things will happen. see issue #23 in gitlab
message:
"Runs QC checkup on various QC tool output, based on custom defined QC thresholds. "
......@@ -72,8 +72,8 @@ rule multiqc_by_sample_final_pass:
rename_config=PROJECT_PATH / "{sample}" / "qc" / "multiqc_initial_pass" / "multiqc_sample_rename_config" / "{sample}_rename_config.tsv",
qc_config="configs/qc_checkup/qc_checkup_config.yaml",
output:
OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc.html",
OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc_data" / "multiqc_general_stats.txt",
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc.html"),
protected(OUT_DIR / "{sample}" / "qc" / "multiqc_final_pass" / "{sample}_multiqc_data" / "multiqc_general_stats.txt"),
# WARNING: don't put this rule in a group, bad things will happen. see issue #23 in gitlab
message:
"Aggregates QC results using multiqc. Final pass, where QC checkup results are also aggregated"
......@@ -94,7 +94,7 @@ rule aggregate_sample_rename_configs:
input:
expand(PROJECT_PATH / "{sample}" / "qc" / "multiqc_initial_pass" / "multiqc_sample_rename_config" / "{sample}_rename_config.tsv", sample=SAMPLES),
output:
OUT_DIR / "project_level_qc" / "multiqc" / "aggregated_rename_configs.tsv",
protected(OUT_DIR / "project_level_qc" / "multiqc" / "aggregated_rename_configs.tsv"),
message:
"Aggregate all sample rename-config files"
run:
......@@ -125,7 +125,7 @@ rule multiqc_aggregation_all_samples:
multiqc_config="configs/multiqc_config.yaml",
rename_config=OUT_DIR / "project_level_qc" / "multiqc" / "aggregated_rename_configs.tsv",
output:
OUT_DIR / "project_level_qc" / "multiqc" / "multiqc_report.html",
protected(OUT_DIR / "project_level_qc" / "multiqc" / "multiqc_report.html"),
message:
"Running multiqc for all samples"
params:
......
......@@ -3,7 +3,7 @@ rule samtools_stats:
input:
PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam",
output:
OUT_DIR / "{sample}" / "qc" / "samtools-stats" / "{sample}.txt",
protected(OUT_DIR / "{sample}" / "qc" / "samtools-stats" / "{sample}.txt"),
wrapper:
"0.64.0/bio/samtools/stats"
......@@ -15,9 +15,9 @@ rule qualimap_bamqc:
index=PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam.bai",
target_regions=get_capture_regions_bed,
output:
html_report=OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "qualimapReport.html",
coverage=OUT_DIR / "{sample}" / "qc/qualimap/{sample}/raw_data_qualimapReport/coverage_across_reference.txt",
summary=OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "genome_results.txt",
html_report=protected(OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "qualimapReport.html"),
coverage=protected(OUT_DIR / "{sample}" / "qc/qualimap/{sample}/raw_data_qualimapReport/coverage_across_reference.txt"),
summary=protected(OUT_DIR / "{sample}" / "qc" / "qualimap" / "{sample}" / "genome_results.txt"),
message:
"stats bam using qualimap"
conda:
......@@ -47,8 +47,8 @@ rule mosdepth_coverage:
bam_index=PROJECT_PATH / "{sample}" / "bam" / "{sample}.bam.bai",
target_regions=get_capture_regions_bed,
output:
dist=OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt",
summary=OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.summary.txt",
dist=protected(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.global.dist.txt"),
summary=protected(OUT_DIR / "{sample}" / "qc" / "mosdepth" / "{sample}.mosdepth.summary.txt"),
message:
"Running mosdepth for coverage. Sample: {wildcards.sample}"
conda:
......@@ -74,7 +74,7 @@ rule mosdepth_plot:
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",
protected(OUT_DIR / "project_level_qc" / "mosdepth" / "mosdepth.html"),
message:
"Running mosdepth plotting"
params:
......@@ -99,8 +99,8 @@ rule indexcov:
sample=SAMPLES,
),
output:
html=OUT_DIR / "project_level_qc" / "indexcov" / "index.html",
bed=OUT_DIR / "project_level_qc" / "indexcov" / "indexcov-indexcov.bed.gz",
html=protected(OUT_DIR / "project_level_qc" / "indexcov" / "index.html"),
bed=protected(OUT_DIR / "project_level_qc" / "indexcov" / "indexcov-indexcov.bed.gz"),
message:
"Running indexcov"
log:
......@@ -125,7 +125,7 @@ rule covviz:
bed=OUT_DIR / "project_level_qc" / "indexcov" / "indexcov-indexcov.bed.gz",
ped=PEDIGREE_FPATH,
output:
html=OUT_DIR / "project_level_qc" / "covviz" / "covviz_report.html",
html=protected(OUT_DIR / "project_level_qc" / "covviz" / "covviz_report.html"),
message:
"Running covviz"
log:
......
......@@ -5,7 +5,7 @@ rule somalier_extract:
sites=config["somalier"]["sites"],
ref_genome=config["ref"],
output:
OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier",
protected(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier"),
message:
"Running somalier extract. Sample: {wildcards.sample}"
singularity:
......@@ -27,10 +27,10 @@ rule somalier_relate:
extracted=expand(OUT_DIR / "project_level_qc" / "somalier" / "extract" / "{sample}.somalier", sample=SAMPLES),
ped=PEDIGREE_FPATH,
output:
out=expand(
out=protected(expand(
OUT_DIR / "project_level_qc" / "somalier" / "relatedness" / "somalier.{ext}",
ext=["html", "pairs.tsv", "samples.tsv"],
),
)),
message:
"Running somalier relate"
singularity:
......@@ -59,10 +59,10 @@ rule somalier_ancestry:
labels_1kg=config["somalier"]["labels_1kg"],
somalier_1kg=directory(config["somalier"]["somalier_1kg"]),
output:
out=expand(
out=protected(expand(
OUT_DIR / "project_level_qc" / "somalier" / "ancestry" / "somalier.somalier-ancestry.{ext}",
ext=["html", "tsv"],
),
)),
message:
"Running somalier ancestry."
singularity:
......
......@@ -2,7 +2,7 @@ rule bcftools_stats:
input:
PROJECT_PATH / "{sample}" / "vcf" / "{sample}.vcf.gz",
output:
OUT_DIR / "{sample}" / "qc" / "bcftools-stats" / "{sample}.bcftools.stats",
protected(OUT_DIR / "{sample}" / "qc" / "bcftools-stats" / "{sample}.bcftools.stats"),
message:
"stats vcf using bcftools"
conda:
......
......@@ -12,8 +12,8 @@ rule verifybamid:
ref_genome=config["ref"],
svd=get_svd,
output:
ancestry=OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.Ancestry",
selfsm=OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.selfSM",
ancestry=protected(OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.Ancestry"),
selfsm=protected(OUT_DIR / "{sample}" / "qc" / "verifyBamID" / "{sample}.selfSM"),
message:
"Running VerifyBamID to detect within-species contamination. sample: {wildcards.sample}"
conda:
......
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