came.utils.preprocess.align_adata_vars

came.utils.preprocess.align_adata_vars(adata1: ~anndata._core.anndata.AnnData, adata2: ~anndata._core.anndata.AnnData, df_varmap_1v1: ~pandas.core.frame.DataFrame | None = None, unify_names: bool = False) -> (<class 'anndata._core.anndata.AnnData'>, <class 'anndata._core.anndata.AnnData'>)

Align the vaiables of two sc.AnnData objects

Parameters:
  • adata1 (AnnData) – reference data

  • adata2 (AnnData) – query data

  • df_varmap_1v1 – a 2-column DataFrame containing one-to-one mapping between variables in adata1 and adata2

  • unify_names – whether to change the variable-names in adata2 to match the adata1.var_names