Skip to content

Commit a4e177a

Browse files
authored
Account for categorical var names when making unique (#115)
1 parent 9ecf0f2 commit a4e177a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/data_processors/process_dataset/script.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ def subsample_adata_group_balanced(adata, group_key, n_samples, seed=0):
181181
adata = adata[subsample_adata_group_balanced(adata, "cell_type", N_MAX_SC, seed=0)]
182182

183183
# Make the single-cell data gene names unique
184+
adata.var_names = adata.var_names.astype(str)
184185
adata.var_names_make_unique()
185186

186187
# Subset single-cell and spatial data to shared genes

0 commit comments

Comments
 (0)