scvi.data.organize_multiome_anndatas

scvi.data.organize_multiome_anndatas(multi_anndata, rna_anndata=None, atac_anndata=None, modality_key='modality')[source]

Concatenate multiome and single-modality input anndata objects. These anndata objects should already have been preprocessed so that both single-modality objects use a subset of the features used in the multiome object. The feature names (index of .var) should match between the objects.

Parameters
multi_anndata : AnnDataAnnData

AnnData object with Multiome data (Gene Expression and Chromatin Accessibility)

rna_anndata : AnnData | NoneOptional[AnnData] (default: None)

AnnData object with gene expression data

atac_anndata : AnnData | NoneOptional[AnnData] (default: None)

AnnData object with chromatin accessibility data

modality_key : strstr (default: 'modality')

The key to add to the resulting AnnData .obs, indicating the modality each cell originated from. Default is “modality”.

Notes

Features that exist in either rna_anndata or atac_anndata but do not exist in multi_anndata will be discarded.

Return type

AnnDataAnnData

Returns

An AnnData object with all cells in the input objects