dandelion.tools.transfer
- dandelion.tools.transfer(adata, dandelion, expanded_only=False, neighbors_key=None, rna_key=None, vdj_key=None, clone_key=None, collapse_nodes=False, overwrite=None)[source]
- Return type:
None
Transfer data in Dandelion slots to AnnData object, updating the .obs, .uns, .obsm and `.obsp`slots.
- Parameters:
adata (AnnData) – AnnData object.
dandelion (Dandelion) – Dandelion object.
expanded_only (bool, optional) – Whether or not to transfer the embedding with all cells with BCR (False) or only for expanded clones (True).
neighbors_key (str | None, optional) – key for ‘neighbors’ slot in .uns.
rna_key (str | None, optional) – prefix for stashed RNA connectivities and distances.
vdj_key (str | None, optional) – prefix for stashed VDJ connectivities and distances.
clone_key (str | None, optional) – column name of clone/clonotype ids. Only used for integration with scirpy.
collapse_nodes (bool, optional) – Whether or not to transfer a cell x cell or clone x clone connectivity matrix into .uns. Only used for integration with scirpy.
overwrite (bool | list[str] | str | None, optional) – Whether or not to overwrite existing anndata columns. Specifying a string indicating column name or list of column names will overwrite that specific column(s).