ct.normalizeBySlope: Normalize sample abundance estimates by the slope of the...

Description Usage Arguments Value Author(s) Examples

View source: R/NormalizeBySlope.R

Description

This function normalizes Crispr gRNA abundance estimates by equalizing the slopes of the middle (logged) values of the distribution across samples. Specifically, the algorithm ranks the gRNA abundance estimates within each sample and determines a relationship between rank change and gRNA within a trimmed region of the distribution via a linear fit. It then adjusts each sample such that the center of the logged abundance distribution is strictly horizontal and returns these values as median-scaled counts in the appropriate slot of the input ExpressionObject.

Usage

1
ct.normalizeBySlope(ExpressionObject, trim = 0.25, lib.size = NULL, ...)

Arguments

ExpressionObject

An ExpressionSet containing, at minimum, count data accessible by exprs, or an EList object with count data in the $E slot (usually returned by voom).

trim

The proportion to be trimmed from each end of the distributionbefore performing the linear fit; algorithm defaults to 25 fit is performed on the interquartile range.

lib.size

An optional vector of size factor adjusted library size. Default: NULL means to use sum of column counts as a lib.size.

...

Other arguments to be passed to ct.normalizeMedians(), if desired.

Value

A renormalized object of the same type as the provided object.

Author(s)

Russell Bainer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data('es')
data('ann')

#Build the sample key and library sizes for visualization
library(Biobase)
sk <- ordered(relevel(as.factor(pData(es)$TREATMENT_NAME), "ControlReference"))
names(sk) <- row.names(pData(es))
ls <- colSums(exprs(es))

es.norm <- ct.normalizeBySlope(es, lib.size= ls)
ct.gRNARankByReplicate(es, sk, lib.size= ls)
ct.gRNARankByReplicate(es.norm, sk, lib.size= ls)

gCrisprTools documentation built on Nov. 8, 2020, 8:17 p.m.