-
Notifications
You must be signed in to change notification settings - Fork 46
Open
Labels
Description
Describe the bug
The basecounts_QC rule located in workflow/rules/mafs.smk fails during execution due to two syntax errors in its shell command block:
- The
--fractargument is constructed asf"--fract={path}", but the underlying script expects a space between the flag and its value (--fract {path}). - An extraneous
--is placed before the positional input file argument{input.COVERAGE}, which causes the script's argument parser to fail.
To Reproduce
Steps to reproduce the behavior:
- V-pipe configuration file used: A configuration where
basecounts_qc.depth_qc_typeis set to"fraction". - Samples TSV file used: Any standard samples.
- Commands executed:
snakemake --use-conda --cores 32 - See error: The pipeline fails at the
basecounts_QCrule with a non-zero exit code.
Expected behavior
The basecounts_QC rule should construct a valid shell command and execute successfully when the configuration requires it.
Screenshots
N/A
Desktop (please complete the following information):
- OS: Linux (HPC environment)
- Version:
masterbranch
Additional context
The fix requires two small changes to the params and shell sections of the basecounts_QC rule.
Here is the corrected version of the rule:
rule basecounts_QC:
input:
COVERAGE="{dataset}/alignments/coverage.tsv.gz",
CHROM_SIZE=(
cohortdir("chrom.size")
if config["basecounts_qc"]["depth_qc_type"] == "fraction"
else []
),
output:
COV_DEPTH_QC="{dataset}/alignments/coverage_depth_qc.yaml",
params:
COV_DEPTH_QC=config.applications["coverage_depth_qc"],
DEPTHS=config["basecounts_qc"]["depth_qc_list"],
CHROM_SIZE=(
f"--fract {cohortdir('chrom.size')}" # Changed "=" to a space
if config["basecounts_qc"]["depth_qc_type"] == "fraction"
else ""
),
log:
outfile="{dataset}/alignments/basecounts_qc.out.log",
errfile="{dataset}/alignments/basecounts_qc.out.log",
conda:
config.basecounts_qc["conda"]
benchmark:
"{dataset}/alignments/coverage_depth_qc.benchmark"
resources:
disk_mb=1250,
mem_mb=config.basecounts_qc["mem"],
runtime=config.basecounts_qc["time"],
threads: 1
shell:
"""
{params.COV_DEPTH_QC} {params.CHROM_SIZE} --depth {params.DEPTHS} --output {output.COV_DEPTH_QC} {input.COVERAGE} \
> "{log.outfile}" 2> >(tee "{log.errfile}" >&2)
""" # Removed "--" before {input.COVERAGE}Applying these changes allows the rule to run as expected.
Reactions are currently unavailable