.n_peptides_per_protein

proteopy.pl.n_peptides_per_protein(adata, first_category, second_category, axis, bin_width=None, bin_range=None, figsize=(6.0, 4.0), show=True, save=None, ax=False)

Plot the distribution of the number of first-category entries per second category.

Parameters:
  • adata (AnnData) – Annotated data matrix.

  • bin_width (float | None) – Optional histogram bin width. Must be positive when provided.

  • bin_range (tuple[float, float] | None) – Optional tuple (lower, upper) limiting the histogram bins. lower must be strictly smaller than upper.

  • figsize (tuple[float, float]) – Size (width, height) in inches passed to matplotlib.pyplot.subplots().

  • show (bool) – Call matplotlib.pyplot.show() when True.

  • save (str | Path | None) – Save the figure to the provided path when given.

  • ax (bool) – Return the Axes instance instead of displaying the plot.

  • Note – This function is a partial of n_cat1_per_cat2_hist, with the following arguments fixed: first_category=’peptide_id’, second_category=’protein_id’, axis=1.

Return type:

Axes | None