Scanpy#

Utility functions for scanpy.

Complex downsampling of AnnData, optionally dropping small cell types#

sample_and_drop(adata, strata_keys[, ...])

Sample adata based on specified strata keys and drop strata with fewer than the min_num_cells.

sample_adata_dict(adata_dict, **kwargs)

Samples each AnnData in adata_dict using sc.pp.subsample().