acdx: Aggregated Cell Differential Expression

Description Usage Arguments Details Value Examples

View source: R/acdx.R

Description

Gene-by-gene meta-regression analysis of aggregated single-cell profiles

Usage

1
2
3
4
5
6
  acdx( ac, X, Gi=NULL, n_boot=1,
    id_boot=NULL, seed_boot=0,
    pbulk=FALSE, mean2sum = TRUE,
    norm_method=1,
    u_0=NULL, s2_0 = 1/12, verbose=0 )
  

Arguments

ac

Aggregated cell object (output of greg)

X

Design matrix

Gi

Group indicators of dispersion parameters. Default: one parameter for all samples.

n_boot

Number of bootstrap resamples

id_boot

Identifier of bootstrap blocks

seed_boot

Random number seed for bootstrapping

pbulk

Use pseudo-bulk approach (negative binomial model)

mean2sum

y is converted from means to sums, if pbulk=TRUE.

norm_method

normalization method: 0 = none, 1 = per cell-type, 2 = global

u_0

Small constant added to the data (default: half of smallest nonzero value in the entire dataset)

s2_0

Small constant variance.

verbose

Print # for each bootstrap replicate when 'verbose=1'. The default is silent.

Details

Fit a gamma-GLM-like regression with variance components that include per data point standard errors from cell-level aggregation. The model is analogous to random-effect meta-regression models used in meta-analysis, but with the variance as quadratic function of the mean. The dispersion parameters can be interpreted as the square of coefficient of variations, modelling relative (multiplicative) error due to between aggregate heterogeneity, after subtractin the cell-level variability.

There are two models fitted step-wise. The first one fits simultaneous row (sample) and column (gene) intercepts, without considering the design matrix. The sample intercepts (which correspond to normalization or size factors) are then used as offset in the second model. The gene intercepts and dispersions are not used for the second model, but are still kept.

The second model is fitted separately for all combination of gene, cell type and bootstrap replicates.

Missing aggregates due to zero or one counts are skipped. The parameters can be NA due to missing aggregates or collinearity (which favor the term that appear first in the design matrix).

Value

gamma

Gene-specific intercepts from first-step model, in natural logarithmic scale.

alpha

Sample-specific intercepts from first-step model, in natural logarithmic scale.

psi

Gene-specific gamma dispersion parameter from the first model. Not in logarithmic scale.

beta

Coefficients from the second-step model, corresponding to columns of X. In natural logarithmic scale.

phi

Gene- and group-specific gamma dispersion parameter from the second model. Not in logarithmic scale.

Examples

1
  ## See `quick tutorial`

pwirapati/acdx documentation built on Jan. 11, 2021, 12:31 a.m.