- scirpy.tl.repertoire_overlap(adata, groupby, *, target_col='clone_id', overlap_measure='jaccard', overlap_threshold=None, fraction=None, inplace=True, added_key='repertoire_overlap')
Compute distance between cell groups based on clonotype overlap.
Adds parwise overlaps, distance matrix and linkage to
This function is experimental and is likely to change in the future.
- adata :
AnnData object to work on.
- groupby :
Column with group labels (e.g. samples, tussue source, diagnosis, etc).
- target_col :
Category that overlaps among groups (
clone_idby default, but can in principle be any group or cluster)
- overlap_measure :
Any distance measure accepted by
scipy.spatial.distance; by default it is
- overlap_threshold :
The minimum required weight to accept presence.
- fraction :
True, compute fractions of abundances relative to the
groupbycolumn 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
Noneassigns equal weight to all cells.
- inplace :
Whether results should be added to
unsor returned directly.
- added_key :
Results will be added to
unsunder this key.
- adata :
- Return type
A DataFrame used by the pairwise scatterplot, distance matrix and linkage.