, groupby, *, target_col='clone_id', pair_to_plot=None, heatmap_cats=None, dendro_only=False, overlap_measure='jaccard', overlap_threshold=None, fraction=None, added_key='repertoire_overlap', **kwargs)

Visualizes overlap betwen a pair of samples on a scatter plot or

Visualizes overlap betwen a pair of samples on a scatter plot or all samples on a heatmap or draws a dendrogram of samples only.


This is an experimental function that will likely change in the future.

adata : AnnData

AnnData object to work on.

groupby : str

Column with group labels (e.g. samples, tissue source, diagnosis, etc).

target_col : str (default: 'clone_id')

Category that overlaps among groups (clone_id by default, but can in principle be any group or cluster)

pair_to_plot : Sequence[str] | NoneOptional[Sequence[str]] (default: None)

A tuple of two sample names that should be plotted on an IR overlap scatterplot.

heatmap_cats : Sequence[str] | NoneOptional[Sequence[str]] (default: None)

Column names that should be shown as category on the side of the heatmap.

dendro_only : bool (default: False)

In case all samples are visualized, sets if a heatmap should be shown or only a dendrogram.

overlap_measure : str (default: 'jaccard')

Any distance measure accepted by scipy.spatial.distance; by default it is jaccard.

overlap_threshold : float | NoneOptional[float] (default: None)

The minimum required weight to accept presence.

fraction : None | str | boolUnion[None, str, bool] (default: None)

If True, compute fractions of abundances relative to the groupby column rather than reporting abosolute numbers. Alternatively, a column name can be provided according to that the values will be normalized or an iterable providing cell weights directly. Setting it to False or None assigns equal weight to all cells.

added_key : str (default: 'repertoire_overlap')

If the tools has already been run, the results are added to uns under this key.


Additional arguments passed to the base plotting function.

Return type



Axes object