dandelion.polars.tools.clone_overlap
- dandelion.polars.tools.clone_overlap(vdj, group_by, min_clone_size=None, weighted_overlap=False, clone_key=None)[source]
A function to tabulate clonal overlap for input as a circos-style plot.
- Parameters:
vdj (DandelionPolars | AnnData) – DandelionPolars or AnnData object.
group_by (str) – column name in obs/metadata for collapsing to columns in the clone_id x group_by data frame.
min_clone_size (int | None, optional) – minimum size of clone for plotting connections. Defaults to 2 if left as None.
weighted_overlap (bool, optional) – if True, instead of collapsing to overlap to binary, overlap will be returned as the number of cells. In the future, there will be the option to use something like a jaccard index.
clone_key (str | None, optional) – column name for clones. None defaults to ‘clone_id’.
- Returns:
clone_id x group_by overlap :class:`pandas.core.frame.DataFrame’.
- Return type:
DataFrame- Raises:
ValueError – if min_clone_size is 0.