From fc61f88277baf5d3ef53161e32cf60659fbdcc43 Mon Sep 17 00:00:00 2001 From: Lilly May <93096564+Lilly-May@users.noreply.github.com> Date: Fri, 6 Sep 2024 22:56:21 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Lukas Heumos --- pertpy/_utils.py | 2 -- pertpy/tools/_perturbation_space/_simple.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/pertpy/_utils.py b/pertpy/_utils.py index a74e924f..c73953ab 100644 --- a/pertpy/_utils.py +++ b/pertpy/_utils.py @@ -14,13 +14,11 @@ def savefig_or_show( ext: str = "png", ) -> Figure | None: if isinstance(save, str): - # check whether `save` contains a figure extension for try_ext in [".svg", ".pdf", ".png"]: if save.endswith(try_ext): ext = try_ext[1:] save = save.replace(try_ext, "") break - # append extension writekey += f"_{save}" save = True diff --git a/pertpy/tools/_perturbation_space/_simple.py b/pertpy/tools/_perturbation_space/_simple.py index 15fc5a60..3cc19efa 100644 --- a/pertpy/tools/_perturbation_space/_simple.py +++ b/pertpy/tools/_perturbation_space/_simple.py @@ -184,13 +184,13 @@ def plot_psbulk_samples( return_fig: bool = False, **kwargs, ) -> Figure | None: - """Plot the pseudobulk samples of an AnnData object. It uses Decoupler implementation. + """Plot the pseudobulk samples of an AnnData object. Plot the count number vs. the number of cells per pseudobulk sample. Args: adata: Anndata containing pseudobulk samples. - groupby: .obs column to color the samples by. + groupby: `.obs` column to color the samples by. {common_plot_args} **kwargs: Are passed to decoupler's plot_psbulk_samples.