FACSPy.sync.sample_ids_from_obs

FACSPy.sync.sample_ids_from_obs#

FACSPy.sync.sample_ids_from_obs(adata)#

This function synchronizes the dataset by selecting the present sample_IDs in adata.obs[“sample_ID”] and subsetting the metadata stored in adata.uns[“metadata”] accordingly.

Parameters:

adata (AnnData) – the current dataset with an uns dict

Return type:

None

Examples

>>> dataset = fp.create_dataset(...)
>>> dataset = dataset[dataset.obs["sample_ID"].isin(["1", "2", "3"]),:]
>>> fp.sync.sample_ids_from_obs_to_metadata(dataset)