ct.normalizeGuides: Normalize an ExpressionSet Containing a Crispr Screen

View source: R/Normalization.R

ct.normalizeGuidesR Documentation

Normalize an ExpressionSet Containing a Crispr Screen

Description

This function normalizes Crispr gRNA abundance estimates contained in an ExpressionSet object. Currently four normalization methods are implemented: median scaling (via normalizeMedianValues), slope-based normalization (via ct.normalizeBySlope()), scaling to the median of the nontargeting control values (via ct.normalizeNTC()), factored quantile normalization (via ct.normalizeFQ()), and spline fitting to the distribution of selected gRNAs (via ct.normalizeSpline()). Because of the peculiarities of pooled Crispr screening data, these implementations may be more stable than the endogenous methods used downstream by voom. See the respective man pages for further details about specific normalization approaches.

Usage

ct.normalizeGuides(
  eset,
  method = c("scale", "FQ", "slope", "controlScale", "controlSpline"),
  annotation = NULL,
  sampleKey = NULL,
  lib.size = NULL,
  plot.it = FALSE,
  ...
)

Arguments

eset

An ExpressionSet object with integer count data extractable with exprs().

method

The normalization method to use.

annotation

The annotation object for the library, required for the methods employing nontargeting controls.

sampleKey

An (optional) sample key, supplied as an ordered factor linking the samples to experimental variables. The names attribute should exactly match those present in eset, and the control set is assumed to be the first level. If 'method' = 'FQ', the sampleKey is taken as the 'sets' argument (and its format requirements are similarly relaxed; see '?ct.normalizeFC').

lib.size

An optional vector of voom-appropriate library size adjustment factors, usually calculated with calcNormFactors and transformed to reflect the appropriate library size. These adjustment factors are interpreted as the total library sizes for each sample, and if absent will be extrapolated from the columnwise count sums of the exprs slot of the eset.

plot.it

Logical indicating whether to plot the ranked log2 gRNA count distributions before and after normalization.

...

Other parameters to be passed to the individual normalization methods.

Value

A renormalized ExpressionSet. If specified, the sample level counts will be scaled so as to maintain the validity of the specified lib.size values.

Author(s)

Russell Bainer

See Also

ct.normalizeMedians, ct.normalizeBySlope, ct.normalizeNTC, ct.normalizeSpline

Examples

data('es')
data('ann')

#Build the sample key as needed
library(Biobase)
sk <- ordered(relevel(as.factor(pData(es)$TREATMENT_NAME), 'ControlReference'))
names(sk) <- row.names(pData(es))

es.norm <- ct.normalizeGuides(es, 'scale', annotation = ann, sampleKey = sk, plot.it = TRUE)
es.norm <- ct.normalizeGuides(es, 'slope', annotation = ann, sampleKey = sk, plot.it = TRUE)
es.norm <- ct.normalizeGuides(es, 'controlScale', annotation = ann, sampleKey = sk, plot.it = TRUE, geneSymb = 'NoTarget')
es.norm <- ct.normalizeGuides(es, 'controlSpline', annotation = ann, sampleKey = sk, plot.it = TRUE, geneSymb = 'NoTarget')

RussBainer/gCrisprTools documentation built on Nov. 5, 2022, 2:35 p.m.