runDescend: Apply DESCEND to all the genes in the count matrix for one...

Description Usage Arguments Value Examples

View source: R/descend.R

Description

Apply DESCEND to deconvolve the true expression level distribution for every geneand calculate relavant distribution measurements. Parallel computing is allowed. For deconvolution of two or more cell populations, see descendMultiPop. For model details, see deconvG.

Usage

1
2
3
4
5
runDescend(count.matrix, ercc.matrix = NULL, scaling.consts = NULL,
  Z = NULL, Z0 = NULL, n.cores = 1, cl = NULL, type = "FORK",
  do.LRT.test = F, family = c("Poisson", "Negative Binomial"),
  NB.size = NULL, show.message = T, verbose = T,
  ercc.trueMol = NULL, control = list(max.sparse = c(0.99, 20)))

Arguments

count.matrix

the observed UMI count matrix. It should be an R object of class matrix or dgeMatrix. Each row is a gene and each column is a cell. The column sums (which should be the library sizes) are used as the input for scaling.consts when both ercc.matrix and scaling.consts are NULL.

ercc.matrix

the ERCC spike-ins are used for computing the cell-specific efficiency constants as scaling.consts when scaling.consts is NULL. Each row is a spike-in genes and each column is a cell. The number and order of the columns should be the same as the number and order of the columns of count.matrix.

scaling.consts

a vector of cell specific scaling constants, either the cell efficiency or the library size

Z

covariates for nonzero mean. Default is NULL.

Z0

covariates for nonzero fraction. Used only when zeroInflate is True. Default is NULL.

n.cores

the number of cores used for parallel computing. Default is 1. Used only when parallel computing is done in a single machine. For using multi-machine cores, need to assign cl explicitly. If verbose is TRUE, then a separated file is created to store the progress of each slave cores.

cl

an object of class "cluster". See more details in makeCluster

type

Default is "FORK" to save memory. Change it to "PSOCK" if you are using Windows and cl is NULL. More details see makeCluster

do.LRT.test

whether do LRT test on the coefficients and nonzero fraction or not. Default is True

family

family of the noise distribution, support either "Poisson" or "Negative Binomial" with known tuning parameter

NB.size

over-dispersion parameter when the family is Negative Binomial: mu = mu + mu^2/size

show.message

whether show messages for the computing progresses. Default is TRUE

verbose

verbose the estimation and testing procedures or not. Default is True.

ercc.trueMol

the true input number of molecules of the ercc spike-ins when ercc.matrix is not NULL.

control

settings see DESCEND.control

Value

a list of DESCEND objects. The length of the list is the same as the number of genes. See also DESCEND. NA if the gene is too sparse or DESCEND fails to find a solution.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Not run: 
## For a Windows machine add the argument: type = "PSOCK"
data(zeisel)
result <- runDescend(zeisel$count.matrix.small, 
                     scaling.consts = zeisel$library.size, n.cores = 3)
hvg <- findHVG(result)
hvg$HVG.genes



result1 <- runDescend(zeisel$count.matrix.small, 
                      zeisel$ercc.matrix, ercc.trueMol = zeisel$trueMol,
                      Z0 = log(zeisel$cell.size),
                      n.cores = 3)

ests <- getEstimates(result1)
ests$CV

## End(Not run)

jingshuw/descend documentation built on Nov. 2, 2021, 4:23 p.m.