liana.plotting.dotplot¶
- liana.plotting.dotplot(adata: AnnData | None = None, uns_key='liana_res', liana_res: DataFrame | None = None, colour: str | None = None, size: str | None = None, source_labels: list | None = None, target_labels: list | None = None, top_n: int | None = None, orderby: str | None = None, orderby_ascending: bool | None = None, orderby_absolute: bool = False, filter_fun: callable | None = None, ligand_complex: str | None = None, receptor_complex: str | None = None, inverse_colour: bool = False, inverse_size: bool = False, cmap: str = 'viridis', size_range: tuple = (2, 9), figure_size: tuple = (8, 6), return_fig=True) ggplot ¶
Dotplot interactions by source and target cells
- 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.
- colour
column in liana_res to define the colours of the dots.
- size
column in liana_res to define the size of the dots.
- 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.
- 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.
- 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.
- 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.
- cmap
Colour map to use for plotting.
- size_range
Define size range. Tuple of (min, max) integers.
- figure_size
Figure x,y size
- Returns:
- A plotnine.ggplot instance