Thank you for the tool your team developed.
I want to show the cells on my umap projection based on barcodes.
I see you’ve shared similar code before.
https://github.com/scverse/scanpy/issues/946
adata.obs[‘filtered_barcodes’] = adata.obs_names.isin[barcodes]
sc.pl.umap(adata, color=‘filtered_barcodes’)
When I tried this, I failed.
I’m sure the barcodes
and adata.obs_names
match, but the isin
function is still returning False
Here are the barcodes I want (F1)
Below are barcodes in adata(F2)
As seen in the figure, the first barcode is an exact match.
However, when I run the following code,
BCadata.obs[‘TEST2’] = BCadata.obs_names.isin([‘Want_barcodes’])
All results are Fasle.(F3)
I’m sure that the barcodes can match, but I don’t know why the results of the isin function are all False. I wonder if you can help me? Thank you very much