.n_proteins_per_sample
- proteopy.pl.n_proteins_per_sample(adata, group_by=None, order_by=None, order=None, ascending=False, zero_to_na=False, layer=None, figsize=(6.0, 4.0), level=None, ylabel='Nr. vars detected', xlabel_rotation=90, order_by_label_rotation=0, show=True, ax=False, save=False, color_scheme=None)
Plot the number of detected proteins per observation.
- Parameters:
adata (AnnData) – AnnData object with proteomics annotations.
group_by (str | None) – Optional column in
adata.obsused to summarise observations into groups. When provided, a boxplot of detected variables per group is shown. Mutually exclusive withorder_by.order_by (str | None) – Optional column in
adata.obsused to assign group labels.order (Sequence[str] | None) – Determines the x-axis order. Without
group_byororder_byit should list observation names. Withorder_byit specifies the group order for the stacked bars. Withgroup_byit specifies the group order for the boxplot.ascending (bool) – When both
group_byandorder_byareNoneandorderisNone, sort observations by detected counts.Falseplaces higher counts to the left.Trueplaces lower counts to the left.zero_to_na (bool) – Treat zero entries as missing values when
True.layer (str | None) – Name of an alternate matrix in
adata.layers. Defaults toadata.X.figsize (tuple[float, float]) – Figure size supplied to
matplotlib.pyplot.subplots().xlabel_rotation (float) – Rotation in degrees applied to x tick labels.
order_by_label_rotation (float) – Rotation in degrees applied to group labels drawn above the plot.
show (bool) – Call
matplotlib.pyplot.show()whenTrue.save (str | Path | None) – Path or truthy value triggering
Figure.savefig.color_scheme (Any | None) – Optional mapping or palette controlling bar colours.
Note – This function is a partial of n_var_per_sample, with the following arguments fixed: level=’protein’, ylabel=’Nr. proteins detected’.
- Return type: