liana.plotting.tileplot

liana.plotting.tileplot(adata: AnnData | None = None, liana_res: DataFrame | None = None, fill: str | None = None, label: str | None = None, label_fun: callable | None = None, source_labels: str | List[str] | None = None, target_labels: str | List[str] | None = None, ligand_complex: str | List[str] | None = None, receptor_complex: str | List[str] | None = None, uns_key: str = 'liana_res', top_n: int | None = None, orderby: str | None = None, orderby_ascending: bool = False, orderby_absolute: bool = True, filter_fun: callable | None = None, source_title=None, target_title=None, cmap: str = 'viridis', figure_size: Tuple[float, float] = (5, 5), label_size: int = 12, return_fig: bool = True)

Tileplot interactions by source and target cells

Parameters:
adata

Annotated data object.

liana_res

liana_res a DataFrame in liana’s format.

fill

column in liana_res to define the fill of the tiles

label

column in liana_res to define the label of the tiles

label_fun

callable to apply to the label column

source_labels

List of labels to use as source, the rest are filtered out.

target_labels

List of labels to use as target, the rest are filtered out.

ligand_complex

list of ligand complexes to filter the interactions to be plotted. Defaults to None.

receptor_complex

list of receptor complexes to filter the interactions to be plotted. Defaults to None.

uns_key

Key in adata.uns that contains the LIANA results. Default is ‘liana_res’.

top_n

top_n entities to plot.

orderby

If top_n is not None, order the interactions by this column

orderby_ascending

If top_n is not None, specify how to order the interactions

orderby_absolute

If top_n is not None, whether to order by the absolute value of the orderby column.

filter_fun

A function, applied along the columns (axis=1), used to filter the results to be plotted.

source_title

Title for the source facet. Default is ‘Source’

target_title

Title for the target facet. Default is ‘Target’

cmap

Colour map to use for plotting.

label_size

Size of the label text

figure_size

Figure x,y size

return_fig

bool whether to return the fig object.

Returns:
A plotnine.ggplot instance