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_id
by default, but can in principle be any group or cluster)pair_to_plot (
Optional
[Sequence
[str
]] (default:None
)) – A tuple of two sample names that should be plotted on an IR overlap scatterplot.heatmap_cats (
Optional
[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 (
Optional
[float
] (default:None
)) – The minimum required weight to accept presence.fraction (
Union
[str
,bool
,None
] (default:None
)) – IfTrue
, compute fractions of abundances relative to thegroupby
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 toFalse
orNone
assigns equal weight to all cells.added_key (
str
(default:'repertoire_overlap'
)) – If the tools has already been run, the results are added touns
under this key.airr_mod (
str
(default:'airr'
)) – Name of the modality with AIRR information is stored in theMuData
object. if anAnnData
object 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