deconvSingle: Deconvolve the true gene expression distribution of a single...

Description Usage Arguments Value Examples

View source: R/deconvSingle.R

Description

The deconvolution is computed by using the function deconvG. This function can automatically discretize the underlying distribution and find the proper tuning parameter c0 of the penalty term. Besides, it computes the estimates and standard deviations of five distribution based statistics (nonzero fraction, nonzero mean, mean, CV and gini coefficient), as well as the estimated coefficients of the covariates on Nonzero mean (Z) and 1 - nonzero fraction (Z0), and store them in a DESCEND object.

Usage

1
2
3
deconvSingle(y, scaling.consts = NULL, Z = NULL, Z0 = NULL,
  plot.density = T, do.LRT.test = T, family = c("Poisson",
  "Negative Binomial"), NB.size = 100, verbose = T, control = list())

Arguments

y

a vector of observed counts across cells for a single gene

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.

plot.density

whether plot the density curve of the deconvolved the distribution or not. The zero inflation part has been smoothed into the density curve for visualization. Default is True.

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

verbose

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

control

settings see DESCEND.control

Value

a DESCEND object. See also DESCEND

Examples

1
2
3
4
X <- rpois(1000, 0.2 * 3)
Z <- rnorm(1000)
result <- deconvSingle(X, Z = Z, Z0 = Z, scaling.consts = rep(0.2, 1000), do.LRT.test = TRUE)
result@estimates

jingshuw/descend documentation built on Sept. 2, 2018, 11:10 a.m.