scVIIntegration | R Documentation |
scVI Integration
scVIIntegration(
object,
features = NULL,
layers = "counts",
conda_env = NULL,
new.reduction = "integrated.dr",
ndims = 30,
nlayers = 2,
gene_likelihood = "nb",
max_epochs = NULL,
...
)
object |
A |
features |
Features to integrate |
layers |
Layers to integrate |
conda_env |
conda environment to run scVI |
new.reduction |
Name under which to store resulting DimReduc object |
ndims |
Dimensionality of the latent space |
nlayers |
Number of hidden layers used for encoder and decoder NNs |
gene_likelihood |
Distribution to use for modelling expression data: "zinb", "nb", "poisson" |
max_epochs |
Number of passes through the dataset taken while training the model |
... |
Unused - currently just capturing parameters passed in from
|
A single-element named list DimReduc
elements containing
the integrated data
This function requires the scvi-tools package to be installed
## Not run:
# Preprocessing
obj <- SeuratData::LoadData("pbmcsca")
obj[["RNA"]] <- split(obj[["RNA"]], f = obj$Method)
obj <- NormalizeData(obj)
obj <- FindVariableFeatures(obj)
obj <- ScaleData(obj)
obj <- RunPCA(obj)
# After preprocessing, we integrate layers, specifying a conda environment
obj <- IntegrateLayers(
object = obj,
method = scVIIntegration,
new.reduction = "integrated.scvi",
conda_env = "../miniconda3/envs/scvi-env",
verbose = FALSE
)
# Alternatively, we can integrate SCTransformed data
obj <- SCTransform(object = obj)
obj <- IntegrateLayers(
object = obj, method = scVIIntegration,
orig.reduction = "pca", new.reduction = "integrated.scvi",
assay = "SCT", conda_env = "../miniconda3/envs/scvi-env", verbose = FALSE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.