Build, Write, and Read AnnDictionaries

Build, Write, and Read AnnDictionaries#

Build#

This module contains the functions necessary to build AdataDict objects from adata in memory.

build_adata_dict(adata, strata_keys, *[, ...])

Build a dictionary of AnnData objects split by the obs columns specified in strata_keys.

Add Stratification#

This module contains the function to add a stratification to an existing AdataDict.

add_stratification(adata_dict, strata_keys, *)

Split each value of an AnnData dictionary into further subsets based on additional desired strata.

Write#

This module contains the functions write AdataDict objects to disk.

write_adata_dict(adata_dict, directory, *[, ...])

Save each AnnData object from an AdataDict into a separate .h5ad file, creating a directory structure that reflects the hierarchy of the AdataDict using key values as directory names.

Read#

This module contains the functions necessary to read AdataDict objects from adata on disk.

read_adata_dict(directory)

Read an AdataDict from a previously saved AdataDict.

read_adata_dict_from_h5ad(paths, *[, keys])

Read .h5ad files from a list of paths and return them in a dictionary.

Concatenate#

Concatenate AdataDict back to a single AnnData

concatenate_adata_dict(adata_dict, *[, ...])

Concatenate all AnnData objects in adata_dict into a single AnnData object.