Cell type labeling help

Before labeling:

I’m trying to label cluster by cell type (PBMC cluster) and not sure if I did it correctly or need to use a different method e.g. CellAssign to re-label these clusters.

Attempted labeling:

ref_data = sc.datasets.pbmc3k_processed()
print(ref_data.shape) ref_data.obs
adata = adata.concatenate(ref_data) adata.obs
sc.pl.umap(adata, color = ['louvain','leiden'], frameon = False)

Hi Caroline. I don’t fully understand your question. Are you trying to plot a umap colored by cell type labels? If so, if you already know the label for all your cell types, you should put them in adata.obs[“my_labels”] then sc.pl.umap(adata, color = [‘my_labels’], frameon = False).

Hi Valeh,
Yes I’m trying to plot umap colored by cell type. I don’t particularly have a set of labels but was hoping to rather use reference data e.g. 10x pbmc data to label cell types.

We have a few tutorials in scvi for annotating cell types, whether using a reference (like your case) or not. You can use scArches if you have a labelled reference and SCANVI (or cellassign) if not.
Have you tried following any of these?

1 Like