From a67499a88a2a62d2d39d4bdfc7dd1870108289ea Mon Sep 17 00:00:00 2001 From: emmanuel-contreras Date: Fri, 12 Jul 2024 12:12:31 -0500 Subject: [PATCH] Fixed str dtype for Unknown cells, Closes #107 --- scimap/tools/phenotype_cells.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scimap/tools/phenotype_cells.py b/scimap/tools/phenotype_cells.py index d0038216..bef72e1d 100644 --- a/scimap/tools/phenotype_cells.py +++ b/scimap/tools/phenotype_cells.py @@ -309,7 +309,7 @@ def remove_phenotype(p, ID, pheno_threshold_percent, pheno_threshold_abs): fail = list(x.loc[x['val'] < x['val'].sum() * pheno_threshold_percent/100].index) if pheno_threshold_abs is not None: fail = list(x.loc[x['val'] < pheno_threshold_abs].index) - d[label] = d[label].replace(dict(zip(fail, np.repeat('Unknown',len(fail))))) + d[label] = d[label].replace(dict(zip(fail, ['Unknown'] * len(fail) ))) # Return return d