Entering edit mode
2.2 years ago
Emily
▴
70
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!
try only
subset = adata[:, adata.var["highly_variable"]]
Thank you!