run_2DImpute: Run 2DImpute on an expression matrix

Description Usage Arguments Value Examples

View source: R/run_2DImpute.R

Description

2DImpute is an imputation algorithm designed for recovering dropouts in single-cell RNA-seq data by using information from two-dimensional relationships (cells and genes), as described in Zhu et al. 2019.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
run_2DImpute(
  exprs,
  t = 0.2,
  genes = NULL,
  k = 10,
  ncores = 1,
  log_input = TRUE,
  return_J = FALSE,
  return_attractors = FALSE,
  verbose = TRUE
)

Arguments

exprs

A log-transformed gene expression data matrix, where rows and columns correspond to genes and cells, respectively.

t

Threshold (between 0 and 1) for determining similar cells in the step of dropout identification. Default is 0.2.

genes

A vector containing gene symbols that will get imputed. Default is NULL, in which case all available genes in the matrix exprs will be imputed.

k

Number of neighbors to be used in the k-nearest neighbor regression in the step of imputeByCells. Default is 10.

ncores

Number of cores to be used. Default is 1.

log_input

Whether the input data matrix is log-transformed. Default is TRUE.

return_J

Whether to return the calculated pairwise Jaccard matrix between cells in the step of findDropouts. Default is FALSE.

return_attractors

Whether to return the co-expressed gene attractors found by the function of attractorFinding. Default is FALSE.

verbose

Whether to show the progress of imputation. Default is TRUE.

Value

A list the following components:

imputed

The imputed version of expression data matrix

attractors

(optional) Identified co-expressed gene attractor signatures

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data(ge_10x_sample)

# Fast demonstration
res <- run_2DImpute(exprs = ge_10x_sample, genes = c('XIST', 'CD3D'), ncores = 2)
imputed_exprs <- res$imputed

# Return identified co-expressed attractor signatures
res <- run_2DImpute(exprs = ge_10x_sample, genes = c('XIST', 'CD3D'), ncores = 2, return_attractors = TRUE)
imputed_exprs <- res$imputed
attractors <- res$attractors

# Full imputation
res <- run_2DImpute(exprs = ge_10x_sample, ncores = 2)
imputed_exprs <- res$imputed

zky0708/2DImpute documentation built on March 12, 2020, 3:13 a.m.