liana.plotting.dotplot

Contents

liana.plotting.dotplot#

liana.plotting.dotplot(adata=None, uns_key='liana_res', liana_res=None, colour=None, size=None, source_labels=None, target_labels=None, top_n=None, orderby=None, orderby_ascending=None, orderby_absolute=False, filter_fun=None, ligand_complex=None, receptor_complex=None, inverse_colour=False, inverse_size=False, cmap='viridis', size_range=(2, 9), figure_size=(8, 6), return_fig=True)#

Dotplot interactions by source and target cells

Parameters:
  • adata (AnnData (default: None)) – Annotated data object.

  • uns_key (str (default: 'liana_res')) – Key in adata.uns that contains the LIANA results. Default is 'liana_res'.

  • liana_res (DataFrame (default: None)) – liana_res a DataFrame in liana’s format.

  • colour (str (default: None)) – column in liana_res to define the colours of the dots.

  • size (str (default: None)) – column in liana_res to define the size of the dots.

  • source_labels (list[str] (default: None)) – List of labels to use as source, the rest are filtered out.

  • target_labels (list[str] (default: None)) – List of labels to use as target, the rest are filtered out.

  • top_n (int (default: None)) – top_n entities to plot.

  • orderby (str | None (default: None)) – If top_n is not None, order the interactions by this column

  • orderby_ascending (bool | None (default: None)) – If top_n is not None, specify how to order the interactions

  • orderby_absolute (bool (default: False)) – If top_n is not None, whether to order by the absolute value of the orderby column.

  • filter_fun (Callable (default: None)) – A function, applied along the columns (axis=1), used to filter the results to be plotted.

  • ligand_complex (str | None (default: None)) – list of ligand complexes to filter the interactions to be plotted. Defaults to None.

  • receptor_complex (str | None (default: None)) – list of receptor complexes to filter the interactions to be plotted. Defaults to None.

  • inverse_colour (bool (default: False)) – Whether to -log10 the colour column for plotting. False by default.

  • inverse_size (bool (default: False)) – Whether to -log10 the size column for plotting. False by default.

  • cmap (str (default: 'viridis')) – Colour map to use for plotting.

  • size_range (tuple[float, float] (default: (2, 9))) – Define size range. Tuple of (min, max) integers.

  • figure_size (tuple[float, float] (default: (8, 6))) – Figure x,y size

  • return_fig (bool (default: True)) – bool whether to return the fig object.

Return type:

Figure

Returns:

The resulting dotplot