tacco.plots.comparison

comparison(adata, keys, colors=None, show_only=None, axsize=(2.0, 2.0), basis_adata=None, basis_keys=None, method_labels=None, counts_location=None, point_size=2, joint=None)[source]

Scatterplots of the annotation fractions of different annotations, e.g. of different annotation methods or of methods and a ground truth.

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.

  • 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().

  • point_size – The size of the points in the plot.

  • joint – Whether to plot only one scatter plot with all annotation categories or only the scatter plots with one annotation category per plot. If None, plot both.

Returns:

A Figure.