From b73d91560506f276f69be952685404ab48a5c8d1 Mon Sep 17 00:00:00 2001 From: jsxlei Date: Sun, 2 Jun 2024 21:21:51 +0000 Subject: [PATCH] v1.0.4 --- scalex/plot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scalex/plot.py b/scalex/plot.py index 03358b9..71636fb 100755 --- a/scalex/plot.py +++ b/scalex/plot.py @@ -65,9 +65,9 @@ def embedding( for ax, b in zip(axes.flatten(), groups): adata.obs['tmp'] = adata.obs[color].astype(str) - adata.obs['tmp'][adata.obs[groupby]!=b] = '' + adata.obs.loc[adata.obs[groupby]!=b, 'tmp'] = '' if cond2 is not None: - adata.obs['tmp'][adata.obs[cond2]!=v2] = '' + adata.obs.loc[adata.obs[cond2]!=v2, 'tmp'] = '' groups = list(adata[(adata.obs[groupby]==b) & (adata.obs[cond2]==v2)].obs[color].astype('category').cat.categories.values) size = min(size, 120000/len(adata[(adata.obs[groupby]==b) & (adata.obs[cond2]==v2)]))