scirpy.pl.repertoire_overlap

scirpy.pl.repertoire_overlap(adata, 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.

Warning

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

Parameters
adata : AnnDataAnnData

AnnData object to work on.

groupby : strstr

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

target_col : strstr (default: 'clone_id')

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

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

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

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

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

dendro_only : boolbool (default: False)

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

overlap_measure : strstr (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 : strstr (default: 'repertoire_overlap')

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

**kwargs

Additional arguments passed to the base plotting function.

Return type

AxesAxes

Returns

Axes object