save_seurat

scib.preprocessing.save_seurat(adata, path, batch, hvgs=None)

Save an anndata object to file as a Seurat object

Convert anndata object to Seurat object through rpy2 and save to file as “RDS” file

This function only accounts for batch assignments and highly variable genes. All other keys are not transferred to the Seurat object.

Parameters
  • adata – anndata object to be saved

  • path – file path where the object should be saved

  • batch – key in adata.obs that holds batch assigments

  • hvgs – list of highly variable genes