c2v.pp.transfer_annotation#
- c2v.pp.transfer_annotation(adata, clones, annotation_obs_clones=None, annotation_obs_adata=None, created_obs_name=None, obs_name=None, na_value='NA')#
Transfer clonal labels from a clones AnnData object to a adata AnnData object, or otherwise. The direction of the transfer is from clones to adata if annotation_obs_clones is provided, or from adata to clones if annotation_obs_adata is provided.
- Parameters:
- adata AnnData
Annotated data matrix at the cell level.
- clones AnnData
Annotated data matrix at the clone level.
- annotation_obs_clones str | list[str] | None, optional
Column(s) in clones.obs containing clonal labels, by default None.
- annotation_obs_adata str | list[str] | None, optional
Name of the new column(s) in adata.obs to store transferred clonal labels, by default None.
- obs_name str | None, optional
Column in adata.obs with the original clonal information, by default None.
- na_value str | None, optional
Value to assign to cells with no matching clone in the clones object, by default “NA”.
- created_obs_name str | list[str] | None
- Return type:
- Returns:
None The adata or clones object is modified in place with the new labels stored in .obs[created_obs_name].