tomas.vis.corrected_UMI_hist

tomas.vis.corrected_UMI_hist(adata, groupby, groups, reference, logUMIby, ratios, return_fig=None)

Compare raw log-UMI-amount distributions versus ratio-based corrected log-UMI-amount distributions.

Parameters:
  • adata (AnnData) – The (annotated) UMI count matrix of shape n_obs × n_vars. Rows correspond to droplets and columns to genes.

  • groupby (str) – The key of the droplet categories stored in adata.obs.

  • groups (list, optional) – Droplet categories, e.g. [‘Homo-ct1’, ‘Homo-ct2’] annotated in adata.obs[groupby] to display. The default is None. We recommand putting the reference group in the first element.

  • reference (str) – One droplet category annotated in adata.obs[groupby]. Use the specified group as reference. Generally, this group has the smallest mRNA content.

  • logUMIby (str) – The key of logUMI values stroed in adata.obs. The default is ‘log10UMIs’.

  • ratios (list) – List of estimated total-mRNA ratios. Each element corresponds to a group specified in ‘groups’. We recommand setting the value of reference group to be 1.

  • return_fig (bool, optional) – Return the matplotlib figure. The default is None.

Returns:

g

Return type:

matplotlib figure