-
Notifications
You must be signed in to change notification settings - Fork 73
Open
Description
Thank you for the package! I'd like to get your opinion on the use of scVI together with DCA. Is it recommended? From my understanding, DCA uses latent representation to denoise/impute data to combat drop-out effect. However, this package does not correct for batch effect, while scVI does. Will something like the below code make sense?
# Set up adata, then run DCA
dca(adata, threads = 8, mode="denoise")
# Get variable genes before scVI
sc.pp.highly_variable_genes(
adata,
flavor="seurat_v3",
n_top_genes = 2000,
layer="counts",
batch_key = "orig.ident",
subset=True)
# Set up model
scvi.model.SCVI.setup_anndata(adata, layer="counts", batch_key="experimental_batch")
# Train
denoised_vae = scvi.model.SCVI(adata, n_layers = 5, n_latent = 50, gene_likelihood="nb")
denoised_vae.train()
# Dim red and clustering
adata.obsm['X_scVI'] = denoised_vae.get_latent_representation()
sc.pp.neighbors(adata, use_rep='X_scVI', n_neighbors = 200)
sc.tl.leiden(adata)
sc.tl.umap(adata, min_dist=1.5, spread = 1.2)
sc.pl.umap(adata, color = ['leiden',], ncols = 1, frameon=False)
Please let me know your thoughts. I'd appreciate your inputs on this.
Metadata
Metadata
Assignees
Labels
No labels