scVI_load: Load scVI output from adata object into SingleCellExperiment

View source: R/scVI.R

scVI_loadR Documentation

Load scVI output from adata object into SingleCellExperiment

Description

Load scVI output from adata object into SingleCellExperiment

Usage

scVI_load(
  adata,
  sce = NULL,
  obs_ignore = c("_scvi_labels", "_scvi_batch"),
  obs_include = "all",
  obs_overwrite = FALSE,
  obs_prefix = "",
  barcodes = intersect,
  reducedDim_prefix = "",
  reducedDim_include = c("X_scVI", "X_umap"),
  reducedDimNames_replace = "^X_",
  RNA_layer = "scvi_normalized",
  altexp_name = "VI_RNA",
  rownames_prefix = "VI_"
)

Arguments

adata

AnnData object containing scVI output

sce

Existing sce object. If supplied, coldata is added to this object and scVI normalized expression is added as an altExp

obs_ignore

Which columns in adata$obs should be ignored before importing?

obs_include

Which columns in adata$obs should be included (default "all")

obs_overwrite

Should columns existing in the sce be overwritten?

obs_prefix

Prefix obs columns before importing

barcodes

Function to handle if different barcodes are included in either SCE or adata objects? Intersect to include only barcodes present in both objects, union to include all barcodes - will fill missing values with NA and missing expression with 0 (default: intersect)

reducedDim_prefix

Prefix reducedDim names before adding to sce

reducedDim_include

Which reducedDims should be transferred from adata$obsm

reducedDimNames_replace

String to replace in obsm names before adding to the sce (removes "^X_" by default)

RNA_layer

Name of adata$layers that contains the scVI normalized expression matrix

altexp_name

Name of altExp to place scVI normalized SCE object if existing sce is supplied

rownames_prefix

Prefix for rownames in scVI normalized SCE

Value

Returns a SingleCellExperiment (SCE). If existing sce is not given the returned SCE contains scVI normalized expression, else scVI normalized expression is added as an altExp


Terkild/scutility documentation built on Jan. 16, 2025, 5:28 p.m.