Hello everyone,
I am using scVI to correct batch effects. However, I have encountered a problem and I need help from all of you.
My layout for my data:
adata AnnData object with n_obs × n_vars = 33486 × 352365 obs: 'features', '_scvi_batch', '_scvi_labels' var: 'orig.ident', 'nCount_RNA', 'nFeature_RNA', 'organ', 'study', 'condition', 'percent.mt'
I hope to clean the batch effect based on the study which is obs.
My code is based on this:
scvi.model.SCVI.setup_anndata(adata, layer = "counts", categorical_covariate_keys=["Sample"], continuous_covariate_keys=['pct_counts_mt', 'total_counts', 'pct_counts_ribo'])
This code do the batch effect based on obs. I am wondering how could I clean batch effect based on var.
I used this common:
However, it appears that the length of my obs and var are not same. Thus this line of code helped me past the study from var to obs, but I missed some information. I am wondering if I can switch obs to var.