This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to subset anndata based on variable

Hello, I want to subset anndata on basis of highly variable gene (stored in .var), but i am not able to understand how to do it.

I tried using adata.var["highly_variable"] == 'True' which gave me an error, while adata.var['highly_variable] returns all the values (boolean) under "highly_variable".

Any help is highly appreciated. Thank you!

python scrna anndata scanpy pandas

try only subset = adata[:, adata.var["highly_variable"]]

0 answers

No answers yet.

Log in to answer this question.