Skip to content

Commit eaa0b8f

Browse files
committed
fix: fix cpu allocation bug, make it only possible to get 2 cpus per task
1 parent 60095f6 commit eaa0b8f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

scripts/utils.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,7 @@ def exec_pipeline(configs, dry_run=False, local=False):
262262
top_env['SNK_CONFIG'] = str(config_file.absolute())
263263
top_env['SINGULARITY_CACHEDIR'] = str(Path(this_config['out_to'], '.singularity').absolute())
264264
this_cmd = [
265-
"snakemake",
266-
"-pr", "--cores", "all",
265+
"snakemake", "-pr",
267266
"--use-singularity",
268267
"--rerun-incomplete",
269268
"--keep-incomplete",

workflow/demux.smk

+6-6
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ rule bcl2fastq:
3333
out_dir = config["out_to"] + "/demux",
3434
container: config["resources"]["sif"] + "bcl2fastq.sif",
3535
log: config["out_to"] + "/logs/bcl2fastq/" + config["run_ids"] + "_" + config["project"] + ".log",
36-
threads: 75
36+
threads: 34
3737
resources:
3838
mem_mb = int(64e3),
3939
shell:
@@ -42,7 +42,7 @@ rule bcl2fastq:
4242
--sample-sheet {input.samplesheet} \
4343
--runfolder-dir {input.run_dir} \
4444
--min-log-level=TRACE \
45-
-r 16 -p 40 -w 16 \
45+
-r 8 -p 16 -w 8 \
4646
--fastq-compression-level 9 \
4747
--no-lane-splitting \
4848
-o {params.out_dir}
@@ -91,7 +91,7 @@ rule bclconvert:
9191
top_unknown = expand("{out_to}/demux/Reports/Top_Unknown_Barcodes.csv", **demux_expand_args if config['bclconvert'] else demux_noop_args),
9292
breadcrumb = expand("{out_to}/demux/.BC_DEMUX_COMPLETE", **demux_expand_args if config['bclconvert'] else demux_noop_args),
9393
container: config["resources"]["sif"] + "weave_bclconvert_0.0.3.sif",
94-
threads: 75
94+
threads: 34
9595
resources: mem_mb = int(64e3)
9696
shell:
9797
"""
@@ -102,9 +102,9 @@ rule bclconvert:
102102
--sample-sheet {input.samplesheet} \
103103
--fastq-gzip-compression-level 9 \
104104
--bcl-sampleproject-subdirectories true \
105-
--bcl-num-conversion-threads 24 \
106-
--bcl-num-compression-threads 24 \
107-
--bcl-num-decompression-threads 24 \
105+
--bcl-num-conversion-threads 16 \
106+
--bcl-num-compression-threads 8 \
107+
--bcl-num-decompression-threads 8 \
108108
--bcl-num-parallel-tiles 3 \
109109
--no-lane-splitting true
110110
touch {output.breadcrumb}

0 commit comments

Comments
 (0)