AnnData, use_label: str, lr: Optional[str] = None, min_ints: int = 2, n_top_ccis: int = 10, cmap: str = 'default', sig_interactions: bool = True, label_size: int = 10, label_rotation: float = 0, title: Optional[str] = None, figsize: tuple = (8, 8), show: bool = True)[source]
Chord diagram of interactions between cell types.

Note that interaction is measured as the total no. of edges connecting two cell types expressing the ligand and/or receptor in significant neighbourhoods for given LR pair.

The chord diagram is read as follows:

Each cell type has a labelled edge taking up a proportion of the outter circle. Chords connecting cell type edges are coloured by the dominant sending cell. Each chord linking cell types has an assymetric shape. For two cell types, A and B, the side of the chord attached to edge A is sized by the total interactions from B->A, where B is expressing the ligand & A is expressing the receptor. Hence, the proportion of a cell type’s edge in the chordplot circle represents the total input signals to that cell type; while the area of the chordplot circle taken up by the outputted chords from a given cell type represents the total output signals from that cell type.

  • adata (AnnData) – Data on which & has been applied.

  • use_label (str) – Indicates the cell type labels or deconvolution results used for cell-cell interaction counting by LR pairs.

  • lr (str) – The LR pair to visualise the CCIs for. If None, will use all pairs via adata.uns[f’lr_cci_{use_label}’].

  • min_ints (int) – Minimum no. of interactions celltypes must have to be shown.

  • n_top_ccis (int) – Maximum no. of CCIs to show, will take the top number of these to display.

  • cmap (str) – Cmap to use to get colors if colors not already in adata.uns[f’{use_label}_colors’]

  • sig_interactions (bool) – Whether to show only significant CCIs or all interaction counts.

  • label_size (str) – The size of the cell type labels to render.

  • label_rotation (float) – Rotation of the cell type label text.

  • title (str) – The title above the plot; informative default is determined based on input.

  • figsize (tuple) – Figure dimensions.

  • show (bool) – Show or not; if not return figure & axes.


  • fig (matplotlib.figure.Figure) – Figure on which the heatmap was drawn if show=False.

  • ax (matplotlib.figure.Axes) – Axes where the heatmap was drawn on if show=False.