CrossImpute: MAGIC imputation of features of an assay based on the...

View source: R/CrossImpute.R

CrossImputeR Documentation

MAGIC imputation of features of an assay based on the distances in another assay

Description

This function imputes features in an assay based on (the merger with) another assay. Typically using the high resolution in the RNA data to impute more noisy additional assays.

Usage

CrossImpute(
  object,
  impute.assay = DefaultAssay(object),
  name = paste0("imputed.", impute.assay),
  impute.features = "all",
  reference.assay = "RNA",
  reference.features = "variable_features",
  npca = 40,
  knn = 3,
  t = 2,
  n.jobs = 6,
  layer.use = "data"
)

Arguments

object

Seurat object.

impute.assay

character(1). The name of the assay which should be imputed, or "metadata" (Default: DefaultAssay(object)).

name

character(1). The name under which the resulting imputed assay is stored in the Seurat object (Default: paste0("imputed_",impute.assay))

impute.features

character(n). Features on which to run the imputation in the impute.assay, or "all" for all features in the impute.assay, or "variable_features" for the variable features in the impute.assay (Default:"all").

reference.assay

character(1). The name of the assay which is appended to the impute.assay to guide imputation distances (Default: "RNA").

reference.features

character(n). Features from the reference.assay to use to guide the imputation of the impute.assay, or "all" for all features in the reference.assay, or "variable_features" for the variable features in the reference.assay (Default:"variable_features").

npca

integer(1). Number of principal components to use for imputation.

knn

integer(1). Number of nearest neighbors on which to compute bandiwth imputation.

t

integer(1). Diffusion parameter passed to MAGIC.

n.jobs

integer(1). Number of threads on which to run the imputation (Default: 6).

layer.use

character(1). Name of the layer to impute (Default: "data").

Value

Seurat object with an additional layer containing MAGIC cross-imputed data.

Examples

MySeuratObject <- CrossImpute(MySeuratObject,"other_assay_to_impute_based_on_RNA_distances")
MySeuratObject[["imputed-RNA"]] # Check result

nbroguiere/burgertools documentation built on Jan. 30, 2024, 3:48 a.m.