liana.plotting.dotplot_by_sample

liana.plotting.dotplot_by_sample(adata: AnnData | None = None, uns_key: str = 'liana_res', liana_res: DataFrame | None = None, sample_key: str = 'sample', colour: str | None = None, size: str | None = None, inverse_colour: bool = False, inverse_size: bool = False, source_labels: str | None = None, target_labels: str | None = None, ligand_complex: None | str | list = None, receptor_complex: None | str | list = None, size_range: tuple = (2, 9), cmap: str = 'viridis', figure_size: tuple = (8, 6), return_fig: bool = True)

A dotplot of interactions by sample

Parameters:
adata
Annotated data object.
uns_key
Key in `adata.uns` that contains the LIANA results. Default is `’liana_res’`.
liana_res
`liana_res` a `DataFrame` in liana’s format.
sample_key

sample_key used to group different samples/contexts from liana_res. Defaults to ‘sample’.

colour
`column` in `liana_res` to define the colours of the dots.
size
`column` in `liana_res` to define the size of the dots.
inverse_colour
Whether to -log10 the `colour` column for plotting. `False` by default.
inverse_size
Whether to -log10 the `size` column for plotting. `False` by default.
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.
size_range
Define size range. Tuple of (min, max) integers.
cmap
Colour map to use for plotting.
figure_size
Figure x,y size
Returns:
Returns a ggplot for the specified interactions by sample.