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 :
AnnData
AnnData
AnnData object to work on.
- groupby :
str
str
Column with group labels (e.g. samples, tissue source, diagnosis, etc).
- target_col :
str
str
(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 :
bool
bool
(default:False
) In case all samples are visualized, sets if a heatmap should be shown or only a dendrogram.
- overlap_measure :
str
str
(default:'jaccard'
) Any distance measure accepted by
scipy.spatial.distance
; by default it isjaccard
.- overlap_threshold :
float
|None
Optional
[float
] (default:None
) The minimum required weight to accept presence.
- fraction :
None
|str
|bool
Union
[None
,str
,bool
] (default:None
) If
True
, 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
str
(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.
- adata :
- Return type
- Returns
Axes object