decoupler.plot_filter_by_expr

decoupler.plot_filter_by_expr(adata, obs=None, group=None, lib_size=None, min_count=10, min_total_count=15, large_n=10, min_prop=0.7, cmap='viridis', figsize=(5, 4), dpi=100, ax=None, return_fig=False, save=None, **kwargs)

Plot to help determining the thresholds of the decoupler.filter_by_expr function.

Parameters:
adataAnnData

AnnData obtained after running decoupler.get_pseudobulk.

obsDataFrame, None

If provided, metadata dataframe, only needed if adata is not an AnnData.

groupstr, None

Name of the .obs column to group by. If None, it assumes that all samples belong to one group.

lib_sizeint, float, None

Library size. If None, default to the sum of reads per sample.

min_countint

Minimum count requiered per gene for at least some samples.

min_total_countint

Minimum total count required per gene across all samples.

large_nint

Number of samples per group that is considered to be “large”.

min_propfloat

Minimum proportion of samples in the smallest group that express the gene.

cmapstr

Colormap to use.

figsizetuple

Figure size.

dpiint

DPI resolution of figure.

axAxes, None

A matplotlib axes object. If None returns new figure.

return_figbool

Whether to return a Figure object or not.

savestr, None

Path to where to save the plot. Infer the filetype if ending on {.pdf, .png, .svg}.

kwargsdict

Other keyword arguments are passed through to sns.histplot.

Returns:
figFigure, None

If return_fig, returns Figure object.