From 63dfb9c47d2d053abf5bd91192514b542386dfaa Mon Sep 17 00:00:00 2001 From: FrancescoSantini Date: Wed, 2 Oct 2024 12:21:06 +0200 Subject: [PATCH] added dynamic resource disk_mb specification for rule multiqc (bottleneck in aws) --- etc/settings.yaml.in | 1 + snakefile.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/etc/settings.yaml.in b/etc/settings.yaml.in index 4612fcd..c3f40c2 100755 --- a/etc/settings.yaml.in +++ b/etc/settings.yaml.in @@ -125,6 +125,7 @@ execution: multiqc: threads: 2 memory: 500 + disk_mb: 20000 coverage_bamCoverage: threads: 1 memory: 4000 diff --git a/snakefile.py b/snakefile.py index 6f90baa..70faba1 100644 --- a/snakefile.py +++ b/snakefile.py @@ -563,7 +563,8 @@ def hisat2_file_arguments(args): group: "qc" output: os.path.join(MULTIQC_DIR, 'multiqc_report.html') resources: - mem_mb = config['execution']['rules']['multiqc']['memory'] + mem_mb = config['execution']['rules']['multiqc']['memory'], + disk_mb = lambda wc, input: max(round(2 * input.size_mb), config['execution']['rules']['multiqc']['disk_mb']) log: os.path.join(LOG_DIR, f'multiqc.{MAPPER}.log') shell: "{MULTIQC_EXEC} -f -o {MULTIQC_DIR} {OUTPUT_DIR} >> {log} 2>&1"