liana.plotting.tileplot

Contents

liana.plotting.tileplot#

liana.plotting.tileplot(adata=None, liana_res=None, fill=None, label=None, label_fun=None, source_labels=None, target_labels=None, ligand_complex=None, receptor_complex=None, uns_key='liana_res', top_n=None, orderby=None, orderby_ascending=False, orderby_absolute=True, filter_fun=None, source_title=None, target_title=None, cmap='viridis', figure_size=(5, 5), label_size=12, return_fig=True)#

Tileplot interactions by source and target cells

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

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

  • fill (str (default: None)) – column in liana_res to define the fill of the tiles

  • label (str (default: None)) – column in liana_res to define the label of the tiles

  • label_fun (Callable (default: None)) – callable to apply to the label column

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

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

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

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

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

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

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

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

  • orderby_absolute (bool (default: True)) – 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.

  • source_title (default: None) – Title for the source facet. Default is ‘Source’

  • target_title (default: None) – Title for the target facet. Default is ‘Target’

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

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

  • label_size (int (default: 12)) – Size of the label text

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

Return type:

Figure

Returns:

The resulting tileplot