kp_counts

besca.pl.kp_counts(adata, min_counts=200, ax=None, figsize=None)[source]

visualize the minimum UMI counts per cell threshold.

this function generates a knee-plot visualizing a given min_counts cutoff when given an adata object

Parameters:
  • adata (AnnData) – The annotated data matrix.

  • min_counts (int | default = 200) – visualize the chosen minimum UMI counts threshold

  • ax (axes | default = None) – pass the axes class to which your figure should be added

  • figsize ((width, height) or None | default = None) – optional parameter to define the figure size of the plot that is to be generated

Returns:

figure is displayed

Return type:

None

Example

Generate a “knee-plot” for a minimum of 600 UMI counts per cell for an example dataset. >>> import besca as bc >>> import matplotlib.pyplot as plt >>> adata = bc.datasets.simulated_pbmc3k_raw() >>> min_counts = 600 >>> fig, ax1 = plt.subplots(1) >>> bc.pl.kp_counts(adata, min_counts = min_counts, ax = ax1)