Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Heumos <lukas.heumos@posteo.net>
  • Loading branch information
Lilly-May and Zethson authored Sep 6, 2024
1 parent 7753a9f commit fc61f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pertpy/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions pertpy/tools/_perturbation_space/_simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit fc61f88

Please sign in to comment.