lamindb.core.datasets.anndata_pbmc68k_reduced

lamindb.core.datasets.anndata_pbmc68k_reduced()

Modified from scanpy.collections.pbmc68k_reduced().

This code was run:

pbmc68k = sc.collections.pbmc68k_reduced()
pbmc68k.obs.rename(columns={"bulk_labels": "cell_type"}, inplace=True)
pbmc68k.obs["cell_type"] = pbmc68k.obs["cell_type"].cat.rename_categories(
    {"Dendritic": "Dendritic cells", "CD14+ Monocyte": "CD14+ Monocytes"}
)
del pbmc68k.obs["G2M_score"]
del pbmc68k.obs["S_score"]
del pbmc68k.obs["phase"]
del pbmc68k.obs["n_counts"]
del pbmc68k.var["dispersions"]
del pbmc68k.var["dispersions_norm"]
del pbmc68k.var["means"]
del pbmc68k.uns["rank_genes_groups"]
del pbmc68k.uns["bulk_labels_colors"]
sc.pp.subsample(pbmc68k, fraction=0.1, random_state=123)
pbmc68k.write("scrnaseq_pbmc68k_tiny.h5ad")
Return type:

AnnData