Skip to content

Commit b10ce05

Browse files
committed
Adjust moscot parameters for memory efficiency
1 parent e91ed91 commit b10ce05

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/methods_cell_type_annotation/moscot/config.vsh.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ arguments:
2828
required: false
2929
direction: input
3030
type: double
31-
default: 1.0
31+
default: 0.3
3232
- name: --rank
3333
required: false
3434
direction: input
3535
type: integer
36-
default: 5000
36+
default: 500 #5000
3737
- name: --mapping_mode
3838
required: false
3939
direction: input

src/methods_cell_type_annotation/moscot/script.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
'celltype_key': 'cell_type',
4040
'alpha': 0.8,
4141
'epsilon': 0.01,
42-
'tau': 1.0,
43-
'rank': 5000,
42+
'tau': 0.3,
43+
'rank': 500, #5000
4444
'mapping_mode': 'max',
4545
}
4646
meta = {
@@ -61,6 +61,8 @@
6161
if adata_sp.n_obs < 10000:
6262
print('Adjusting rank to -1 since data set is small (n_obs < 10k)', flush=True)
6363
par['rank'] = -1
64+
print("Also, adjusting tau to 1.0 since data set is small", flush=True)
65+
par['tau'] = 1.0
6466

6567
# Check for normalized layer and centroid information
6668
assert "normalized" in adata_sc.layers.keys(), 'Layer "normalized" is required for single-cell anndata'

0 commit comments

Comments
 (0)