% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scVI.R
\name{scVIIntegration}
\alias{scVIIntegration}
\title{scVI Integration}
\usage{
scVIIntegration(
  object,
  features = NULL,
  layers = "counts",
  conda_env = NULL,
  new.reduction = "integrated.dr",
  ndims = 30,
  nlayers = 2,
  gene_likelihood = "nb",
  max_epochs = NULL,
  ...
)
}
\arguments{
\item{object}{A \code{StdAssay} or \code{STDAssay} instance containing
merged data}

\item{features}{Features to integrate}

\item{layers}{Layers to integrate}

\item{conda_env}{conda environment to run scVI}

\item{new.reduction}{Name under which to store resulting DimReduc object}

\item{ndims}{Dimensionality of the latent space}

\item{nlayers}{Number of hidden layers used for encoder and decoder NNs}

\item{gene_likelihood}{Distribution to use for modelling expression 
data: {"zinb", "nb", "poisson"}}

\item{max_epochs}{Number of passes through the dataset taken while
training the model}

\item{...}{Unused - currently just capturing parameters passed in from
\code{Seurat::IntegrateLayers} intended for other integration methods}
}
\value{
A single-element named list \code{DimReduc} elements containing
the integrated data
}
\description{
scVI Integration
}
\note{
This function requires the
\href{https://docs.scvi-tools.org/en/stable/installation.html}{\pkg{scvi-tools}}
package to be installed
}
\examples{
\dontrun{
# 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
)
}

}
\seealso{
\href{https://docs.scvi-tools.org/en/stable/tutorials/notebooks/scvi_in_R.html}{scVI}
}
