From 3d06f7debb5841cbf3fde7b1b398e7ed50e71b52 Mon Sep 17 00:00:00 2001 From: skchronicles Date: Mon, 28 Oct 2024 13:03:43 -0400 Subject: [PATCH] Bumping up clairs-to allocated memory and providing half of allocted threads --- config/cluster/slurm.json | 4 ++-- config/cluster/uge.json | 2 +- workflow/rules/somatic.smk | 8 ++++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/config/cluster/slurm.json b/config/cluster/slurm.json index 876fb93..e616d80 100644 --- a/config/cluster/slurm.json +++ b/config/cluster/slurm.json @@ -76,7 +76,7 @@ "threads": "24", "mem": "64G", "time": "1-18:00:00", - "gres": "lscratch:800" + "gres": "lscratch:1200" }, "deepvariant": { "threads": "18", @@ -297,7 +297,7 @@ "threads": "24" }, "clairs_tumor_only": { - "mem": "64G", + "mem": "120G", "time" : "1-00:00:00", "threads": "24" }, diff --git a/config/cluster/uge.json b/config/cluster/uge.json index febd482..671a18d 100644 --- a/config/cluster/uge.json +++ b/config/cluster/uge.json @@ -287,7 +287,7 @@ "threads": "8" }, "clairs_tumor_only": { - "mem": "4G", + "mem": "5G", "partition": "", "threads": "8" }, diff --git a/workflow/rules/somatic.smk b/workflow/rules/somatic.smk index f6e1156..02c69b2 100644 --- a/workflow/rules/somatic.smk +++ b/workflow/rules/somatic.smk @@ -50,6 +50,7 @@ def get_normal_pileup_table(wildcards): # Runs in tumor-only mode return [] + def get_somatic_tn_callers(wildcards): """Returns somatic variants found with tumor-normal variant callers. For tumor-normal samples, extra somatic callers @@ -706,7 +707,10 @@ rule clairs_tumor_only: genome = config['references']['GENOME'], outdir = join(workpath, "clairs", "somatic", "{name}"), threads: - int(allocated("threads", "clairs_tumor_only", cluster)), + # ClairS-TO over utilizes threads, + # testing has shown it over utilizes + # around 50% of the threads allocated + max(int(int(allocated("threads", "clairs_tumor_only", cluster))/2.0), 2), container: config['images']['clairs-to'] envmodules: config['tools']['rlang'] shell: """ @@ -789,7 +793,7 @@ rule deepsomatic: # mechanism for deletion on exit if [ ! -d "{params.tmpdir}" ]; then mkdir -p "{params.tmpdir}"; fi tmp=$(mktemp -d -p "{params.tmpdir}") - trap 'rm -rf "${{tmp}}"' EXIT + trap 'du -sh "${{tmp}}"; rm -rf "${{tmp}}"' EXIT run_deepsomatic \\ --model_type={params.dv_model_type} \\