From b51a2c9d3860fd328be649a7eb8c00385b79dbd9 Mon Sep 17 00:00:00 2001 From: Emma Dann <32264060+emdann@users.noreply.github.com> Date: Wed, 6 Mar 2024 17:40:13 +0100 Subject: [PATCH] fix size error in plot_da_beeswarm (#551) Co-authored-by: EC2 Default User --- pertpy/plot/_milopy.py | 2 +- pertpy/tools/_milo.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pertpy/plot/_milopy.py b/pertpy/plot/_milopy.py index 34c61bce..004b361b 100644 --- a/pertpy/plot/_milopy.py +++ b/pertpy/plot/_milopy.py @@ -139,7 +139,7 @@ def da_beeswarm( Args: mdata: MuData object - anno_col: Column in adata.uns['nhood_adata'].obs to use as annotation. (default: 'nhood_annotation'.) + anno_col: Column in mdata['milo'].var to use as annotation. (default: 'nhood_annotation'.) alpha: Significance threshold. (default: 0.1) subset_nhoods: List of nhoods to plot. If None, plot all nhoods. (default: None) palette: Name of Seaborn color palette for violinplots. diff --git a/pertpy/tools/_milo.py b/pertpy/tools/_milo.py index 2a347b18..bf64dc70 100644 --- a/pertpy/tools/_milo.py +++ b/pertpy/tools/_milo.py @@ -861,7 +861,7 @@ def plot_da_beeswarm( nhood_adata.obs[anno_col] except KeyError: raise RuntimeError( - f"Unable to find {anno_col} in mdata.uns['nhood_adata']. Run 'milopy.utils.annotate_nhoods(adata, anno_col)' first" + f"Unable to find {anno_col} in mdata['milo'].var. Run 'milopy.utils.annotate_nhoods(adata, anno_col)' first" ) from None if subset_nhoods is not None: @@ -897,7 +897,6 @@ def plot_da_beeswarm( y=anno_col, x="logFC", order=sorted_annos, - size=190, inner=None, orient="h", palette=palette, @@ -910,7 +909,6 @@ def plot_da_beeswarm( y=anno_col, x="logFC", order=sorted_annos, - size=190, inner=None, orient="h", linewidth=0,