The totalVI DE test; gene names

Hello,
I was using the totalVI de test with scvi tools 0.13.0. After updating to scvi tools 0.16.0 I am not able to get the gene names as the first column of the de_df matrix. Rather, the first column is the number corresponding to the gene or feature as given in my adata.var[‘features’]. Is this related to the updated version of scvi tools or is there something else that I may be missing?

Thank you

Milcah

Hi,

Thanks for using scvi-tools. Could you paste code to reproduce this issue? I tried reproducing on 0.16.2, but found the index of the resulting dataframe of model.differential_expression still shows the appropriate var names rather than indices.

Best,
Justin

Hi Justin

Thank you for your response. I was able to figure out that it was the update to AnnData 0.8.0 from 0.7.6 that underlying the issue of not having gene names. When I loaded my Anndata object with AnnData 0.8.0 my adata.var[‘features’] array was changed so that the row names were indices. I did pip install AnnData 0.7.6 in my environment and then loaded my Anndata object and now I can see the appropriate var names!

So in short, it was my AnnData object structure and not scvi tools and the version of anndata mattered.

Thank you
Milcah

1 Like