Skip to content

Commit ecb67b5

Browse files
authored
Add gpu for moscot and change parallelization of baysor (#56)
1 parent a5dd37d commit ecb67b5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/methods_cell_type_annotation/moscot/config.vsh.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ runners:
5757
- type: executable
5858
- type: nextflow
5959
directives:
60-
label: [ hightime, midcpu, veryhighmem ]
60+
label: [ hightime, midcpu, veryhighmem, gpu ]

src/methods_transcript_assignment/baysor/script.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,12 @@
114114

115115
# Make transcript patches
116116
sopa.make_transcript_patches(sdata_sopa, patch_width=2000, patch_overlap=50, prior_shapes_key="cell_id")
117-
sopa.settings.parallelization_backend = "dask"
118117

119118
# Run baysor
119+
# sopa.settings.parallelization_backend = "dask" #NOTE: didn't lead to high speed, also I think workers kept dying, instead went with JULIA_NUM_THREADS
120+
n_threads = meta['cpus'] or os.cpu_count()
121+
n_threads = max(n_threads-2, 1)
122+
os.environ['JULIA_NUM_THREADS'] = str(n_threads)
120123
sopa.segmentation.baysor(sdata_sopa, config=str(CONFIG_TOML))
121124

122125
# Assign transcripts to cell ids

0 commit comments

Comments
 (0)