Skip to content

Commit a4ad1a1

Browse files
committed
remove threads directive from each rule. every thread should get a single core
1 parent a9a87a2 commit a4ad1a1

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

Snakefile

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ rule stitch:
112112
files = directory(config['out']+"/{sample}/stitch"+("-lowQual" if check_config('low_qual_ortho', check_config('parallel')) else "")+"/stitched.files")
113113
conda: "envs/default.yml"
114114
benchmark: config['out']+"/{sample}/benchmark/stitch"+("-lowQual" if check_config('low_qual_ortho', check_config('parallel')) else "")+".tsv"
115-
threads: config['cores']
116115
shell:
117116
"scripts/stitch.py {params} {input} {output.project}"
118117

@@ -124,7 +123,6 @@ rule export_ortho:
124123
str(Path(rules.stitch.output.project).parents[0])+"/ortho.tiff"
125124
conda: "envs/default.yml"
126125
benchmark: config['out']+"/{sample}/benchmark/export_ortho.tsv"
127-
threads: config['cores']
128126
shell:
129127
"scripts/export_ortho.py {input} {output}"
130128

@@ -139,7 +137,6 @@ rule segment:
139137
low = config['out']+"/{sample}/segments/low/{image}.json" if check_config('parallel') else config['out']+"/{sample}/segments/low.json"
140138
conda: "envs/default.yml"
141139
benchmark: config['out']+"/{sample}/benchmark/segments/"+("{image}" if check_config('parallel') else "ortho")+".tsv"
142-
threads: config['cores']
143140
shell:
144141
"scripts/segment.py {params} {input} {output}"
145142

@@ -154,7 +151,6 @@ rule transform:
154151
confidence="(high|low)"
155152
conda: "envs/default.yml"
156153
benchmark: config['out']+"/{sample}/benchmark/transform/{confidence}-{image}.json"
157-
threads: config['cores']
158154
shell:
159155
"scripts/transform.py {input} {output}"
160156

@@ -192,7 +188,6 @@ rule watershed:
192188
segments = config['out']+"/{sample}/segments"+exp_str()+".json"
193189
conda: "envs/default.yml"
194190
benchmark: config['out']+"/{sample}/benchmark/watershed"+exp_str()+".tsv"
195-
threads: config['cores']
196191
shell:
197192
"scripts/watershed.py {input.ortho} {params.high_dir} {params.low_dir} {output.segments}"
198193

@@ -283,7 +278,6 @@ rule train:
283278
config['out']+"/{sample}/train"+exp_str()+"/model.rda",
284279
config['out']+"/{sample}/train"+exp_str()+"/variable_importance.tsv"
285280
conda: "envs/classify.yml"
286-
threads: config['cores']
287281
shell:
288282
"Rscript scripts/classify_train.R {input} {output}"
289283

@@ -327,7 +321,6 @@ rule classify:
327321
config['out']+"/{sample}/classify"+exp_str()+"/{image}.tsv"
328322
conda: "envs/classify.yml"
329323
benchmark: config['out']+"/{sample}/benchmark/classify"+exp_str()+"/{image}.tsv"
330-
threads: config['cores']
331324
shell:
332325
"Rscript scripts/classify_test.R {input} {output}"
333326

@@ -338,7 +331,6 @@ rule test:
338331
config['out']+"/{sample}/test"+exp_str()+"/classify/{image}.tsv"
339332
conda: "envs/classify.yml"
340333
benchmark: config['out']+"/{sample}/benchmark/test"+exp_str()+"/classify/{image}.tsv"
341-
threads: config['cores']
342334
shell:
343335
"Rscript scripts/classify_test.R {input} {output}"
344336

@@ -434,7 +426,6 @@ rule segments_map:
434426
config['out']+"/{sample}/segments-map"+exp_str()+".tiff"
435427
conda: "envs/default.yml"
436428
benchmark: config['out']+"/{sample}/benchmark/segments-map"+exp_str()+".tsv"
437-
threads: config['cores']
438429
shell:
439430
"scripts/map.py -l {input.img} {input.labels} {output}"
440431

@@ -448,7 +439,6 @@ rule map:
448439
config['out']+"/{sample}/map"+exp_str()+".tiff"
449440
conda: "envs/default.yml"
450441
benchmark: config['out']+"/{sample}/benchmark/map"+exp_str()+".tsv"
451-
threads: config['cores']
452442
shell:
453443
"scripts/map.py {input.img} {input.labels} {output} {input.predicts}"
454444

config.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,6 @@ model: data/models/test-all-exp.rda
7070
# Defaults to 'out' if not provided
7171
out: out
7272

73-
# specifying the number of cores used to process each dataset
74-
# TODO: note that this wouldn't work yet - we need to have parallel environments defined
75-
# in purves first before we can use snakemake's multithread feature
76-
# I just have it defined here so in the future if we have parallel environment
77-
# we could use it
78-
cores: 5 # The number of cores to use for this step
79-
80-
8173
# FOR THE RULE extract_images (only uncomment if using that rule)
8274
# specifying the list of segment labels that you want to extract the
8375
# source images for

0 commit comments

Comments
 (0)