tech_trend: Make a technical trend & decompose the gene-level variance

View source: R/tech_trend.R

tech_trendR Documentation

Make a technical trend & decompose the gene-level variance

Description

Make a technical trend using scran makeTechTrend and decompose the gene-level variance using scran modelGeneVar.

Usage

tech_trend(
  sce,
  dispersion = 0,
  assay_type = "logcounts",
  block = NULL,
  design = NULL,
  ncores = 1,
  prefix = NULL,
  plot = TRUE
)

Arguments

sce

A SingleCellExperiment object containing expression values, usually counts.

dispersion

A numeric scalar specifying the dispersion for the NB distribution. If zero, a Poisson distribution is used.

assay_type

A string specifying which assay values to use, e.g., "counts" or "logcounts".

block

A factor specifying the blocking levels for each cell in x. If specified, variance modelling is performed separately within each block and statistics are combined across blocks.

design

A numeric matrix containing blocking terms for uninteresting factors of variation.

ncores

Number of cores.

prefix

Prefix for file name for the QC metrics histograms.

plot

TRUE/FASLE for whether plot the QC metrics histograms.

Value

A list of a dataframe for the variance components and a function accepting a mean log-expression as input and returning the variance of tecnical noise.


huipan1973/ezscrnaseq documentation built on July 12, 2022, 9:36 p.m.