This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Anndata: finding cells that express a specific gene

Dear all, I am analyzing my single cell data using Scanpy package and as you may knwo it stores my data in anndata object which is a panda like data frame. I am interested to know which of my cells express the gene x. Does anyone has an idea how would I be able to access that information? I am not really familiar with data structures in Python and specially panda

python rna-seq

1 answer

Ok I found my answer :D It was not that complicated

adata[:, adata.var_names.str.match('genenames')]

Log in to answer this question.