mira.utils.make_joint_representation#
- mira.utils.make_joint_representation(adata1, adata2, adata1_key='X_umap_features', adata2_key='X_umap_features', key_added='X_joint_umap_features')#
Finds common cells between two dataframes and concatenates features to form the joint representation.
- Parameters
- adata1, adata2anndata.AnnData
Two AnnData objects from which to construct joint representation. Order (ATAC or RNA) does not matter.
- adata1_keystr, default=’X_umap_features’
Which key in .obsm to find ILR-transformed topic embeddings in adata1.
- adata2_keystr, default=’X_umap_features’
Which key in .obsm to find ILR-transformed topic embeddings in adata2.
- key_addedstr, default=’X_joint_umap_features’
Key to add to both adatas’ .obsm containing the joint representation.
- Returns
- adata1, adata2anndata.AnnData
Adata objects returned in the order provided. New adata objects contain only cells common between both input adatas, and have the same ordering. Both adatas have a new field: the joint representation, stored in .obsm[<key_added>].