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', airr_mod='airr', **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 (
Union[AnnData,MuData,DataHandler]) – AnnData or MuData object that contains AIRR information.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_idby default, but can in principle be any group or cluster)pair_to_plot (
None|Sequence[str] (default:None)) – A tuple of two sample names that should be plotted on an IR overlap scatterplot.heatmap_cats (
None|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 byscipy.spatial.distance; by default it isjaccard.overlap_threshold (
None|float(default:None)) – The minimum required weight to accept presence.fraction (
None|str|bool(default:None)) – IfTrue, compute fractions of abundances relative to thegroupbycolumn 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 toFalseorNoneassigns equal weight to all cells.added_key (
str(default:'repertoire_overlap')) – If the tools has already been run, the results are added tounsunder this key.airr_mod (
str(default:'airr')) – Name of the modality with AIRR information is stored in theMuDataobject. if anAnnDataobject is passed to the function, this parameter is ignored.**kwargs – Additional arguments passed to the base plotting function (scatter or seaborn.clustermap, repsectively).
- Return type:
ClusterGrid|Axes- Returns:
Axes object