tacco.plots.cellsize

cellsize(adata, keys, colors=None, show_only=None, axsize=(1.5, 1.5), basis_adata=None, basis_keys=None, pfn_key=None, use_reference=False, method_labels=None, counts_location=None)[source]

Scatter plots of average cell sizes in an annotation category in the whole dataset against some reference dataset. These cell sizes are given as the average number of counts per unit cell.

Parameters:
  • adata – An AnnData including annotation in .obs and/or .obsm. Can also be a mapping of labels to AnnData to specify multiple datasets.

  • keys – The .obs/.obsm annotation keys to compare. Can be a single string, or a list of strings, or a mapping of the labels of adata to strings or lists of strings.

  • colors – A mapping of annotation values to colors. If None, default colors are used.

  • show_only – A subset of annotation values to restrict the plotting to.

  • axsize – Tuple of width and size of a single axis.

  • basis_adata – like adata, but for reference data.

  • basis_keys – like adata, but for reference data.

  • pfn_key – A .varm key containing platform normalization factors. Ignored if platform normalization is not requested via use_reference.

  • use_reference

    Whether and how to use reference data for the determination of cell sizes in non-reference data. Can be a single choice or an array of choices. Possible choices are:

    • False: Dont use the reference

    • True: Determine the cell sizes on the set of common genes with the reference data

    • ’pfn’: Like True, but use additionally platform normalization factors.

    • None: Use all settings which are available, i.e. includes True, False, and if `pfn_key!=None also ‘pfn’.

  • method_labels – A mapping from the strings in keys and basis_keys to (shorter) names to show in the plot.

  • counts_location – A string or tuple specifying where the count matrix is stored, e.g. ‘X’, (‘raw’,’X’), (‘raw’,’obsm’,’my_counts_key’), (‘layer’,’my_counts_key’), … For details see counts().

Returns:

A Figure.