Hello,
If I have a list of cells that I want to look at (and their corresponding barcodes), is it possible to filter to just those cells?
Thanks
if you have the barcodes in a list, the following command will give you a new adata object filtered for those cells:
adata[barcodes].copy()
Thanks for this.
One more question for you. If I want to color cells on my umap projection based on barcodes instead of by gene, is there an easy implementation of that? Thanks! @coh-racng
adata.obs['filtered_barcodes'] = adata.obs_names.isin[barcodes]
sc.pl.umap(adata, color='filtered_barcodes')
Most helpful comment
if you have the barcodes in a list, the following command will give you a new adata object filtered for those cells: