normalizeCtData: Normalization of Ct values from qPCR data.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/normalizeCtData.R

Description

This function is for normalizing Ct data from high-throughput qPCR platforms like the TaqMan Low Density Arrays. Normalization can be either within or across different samples.

Usage

1
normalizeCtData(q, norm = "deltaCt", deltaCt.genes = NULL, scale.rank.samples, rank.type = "pseudo.median", Ct.max = 35, geo.mean.ref, verbose = TRUE)

Arguments

q

object of class qPCRset.

norm

character string with partial match allowed, the normalisation method to use. "deltaCt" (default) , "scale.rankinvariant", "norm.rankinvariant", "quantile" and "geometric.mean" are implemented. See details.

deltaCt.genes

character vector, the gene(s) to use for deltaCt normalization. Must correspond to some of the featureNames in q or NULL, in which case the endogenous controls from featureType are used.

scale.rank.samples

integer, for the "scale.rankinvariant" method, how many samples should a feature be rank invariant across to be included. Defaults to number of samples-1.

rank.type

string, the reference sample for the rank invariant normalisation. Either "pseudo.median" or "pseudo.mean" for using the median or mean across samples as a pseudo-reference sample.

Ct.max

numeric, Ct values above this will be ignored when identifying rank invariant genes.

geo.mean.ref

numeric, the reference sample to scale to for the "geometric.mean" method. Defaults to sample number 1.

verbose

boolean, should some information be printed to the prompt.

Details

"quantile" will make the expression distributions across all cards more or less identical. "deltaCt" calculates the standard deltaCt values, i.e. subtracts the mean of the chosen controls from all other values on the array. "scale.rankinvariant" sorts features from each sample based on Ct values, and identifies a set of features that remain rank invariant, i.e. whose ordering is constant. The average of these rank invariant features is then used to scale the Ct values on each array individually. "norm.rankinvariant" also identifies rank invariant features between each sample and a reference, and then uses these features to generate a normalisation curve individually for each sample by smoothing. "geometric.mean" calculates the geometric mean of all Ct values below Ct.max in each sample, and scales the Ct values accordingly.

For the rank invariant methods it can make a significant difference whether high Ct values, such as "40" or something else being used for undetermined Ct values is removed during the normalisation using the Ct.max parameter. "norm.rankinvariant" also depends on having enough rank invariant genes for generating a robust smoothing curve.

"quantile" is base on normalizeQuantiles from limma, and the rank invariant normalisations implement methods from normalize.invariantset in package affy.

The distribution of Ct values before/after normalisation can be assessed with the function plotCtDensity.

Value

An object of class qPCRset like the input.

Author(s)

Heidi Dvinge

See Also

normalize.invariantset for the rank invariant normalisations, normalizequantiles and plotCtDensity

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Load example data
data(qPCRraw)
# Perform different normalisations
dnorm <- normalizeCtData(qPCRraw, norm="deltaCt", deltaCt.genes="Gene1")
qnorm <- normalizeCtData(qPCRraw, norm="quantile")
nrnorm <- normalizeCtData(qPCRraw, norm="norm.rankinvariant")
srnorm <- normalizeCtData(qPCRraw, norm="scale.rankinvariant")
gnorm <- normalizeCtData(qPCRraw, norm="geometric.mean")
# Normalized versus raw data
cols <- rep(brewer.pal(6, "Spectral"), each=384)
plot(exprs(qPCRraw), exprs(dnorm), pch=20, col=cols, main="deltaCt normalization")
plot(exprs(qPCRraw), exprs(qnorm), pch=20, col=cols, main="Quantile normalization")
plot(exprs(qPCRraw), exprs(nrnorm), pch=20, col=cols, main="norm.rankinvariant")
plot(exprs(qPCRraw), exprs(srnorm), pch=20, col=cols, main="scale.rankinvariant")
plot(exprs(qPCRraw), exprs(gnorm), pch=20, col=cols, main="geometric.mean")
# With or without removing high Ct values
nrnorm <- normalizeCtData(qPCRraw, norm="norm.rankinvariant")
nrnorm2 <- normalizeCtData(qPCRraw, norm="norm.rankinvariant", Ct.max=40)
plot(exprs(nrnorm), exprs(nrnorm2), pch=20, col=cols, xlab="Ct.max = 35", ylab="Ct.max = 40")
# Distribution of the normalised data
par(mfrow=c(2,3), mar=c(3,3,2,1))
plotCtDensity(qPCRraw, main="Raw Ct values")
plotCtDensity(dnorm, main="deltaCt")
plotCtDensity(qnorm, main="quantile")
plotCtDensity(srnorm, main="scale.rankinvariant")
plotCtDensity(nrnorm, main="norm.rankinvariant")
plotCtDensity(gnorm, main="geometric.mean")

Example output

Loading required package: Biobase
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colMeans, colSums, colnames, do.call,
    duplicated, eval, evalq, get, grep, grepl, intersect, is.unsorted,
    lapply, lengths, mapply, match, mget, order, paste, pmax, pmax.int,
    pmin, pmin.int, rank, rbind, rowMeans, rowSums, rownames, sapply,
    setdiff, sort, table, tapply, union, unique, unsplit, which,
    which.max, which.min

Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: RColorBrewer
Loading required package: limma

Attaching package: 'limma'

The following object is masked from 'package:BiocGenerics':

    plotMA

Warning message:
In read.dcf(con) :
  URL 'http://bioconductor.org/BiocInstaller.dcf': status was 'Couldn't resolve host name'
Calculating deltaCt values
	Using control gene(s): Gene1 
	Card 1:	Mean=11.7	Stdev=0.257
	Card 2:	Mean=11.79	Stdev=0.183
	Card 3:	Mean=10.76	Stdev=0.208
	Card 4:	Mean=11.7	Stdev=0.22
	Card 5:	Mean=10.64	Stdev=0.299
	Card 6:	Mean=10.76	Stdev=0.244
Normalizing Ct values
	Using rank invariant genes:
	sample1: 71 rank invariant genes
	sample2: 43 rank invariant genes
	sample3: 41 rank invariant genes
	sample4: 76 rank invariant genes
	sample5: 22 rank invariant genes
	sample6: 62 rank invariant genes
Scaling Ct values
	Using rank invariant genes: Gene1 Gene29 
	Scaling factors: 1.00 1.06 1.00 1.03 1.00 1.00 
Scaling Ct values
	Using geometric mean within each sample
	Scaling factors: 1.00 1.06 1.05 1.02 1.04 1.02 
Normalizing Ct values
	Using rank invariant genes:
	sample1: 71 rank invariant genes
	sample2: 43 rank invariant genes
	sample3: 41 rank invariant genes
	sample4: 76 rank invariant genes
	sample5: 22 rank invariant genes
	sample6: 62 rank invariant genes
Normalizing Ct values
	Using rank invariant genes:
	sample1: 89 rank invariant genes
	sample2: 116 rank invariant genes
	sample3: 96 rank invariant genes
	sample4: 133 rank invariant genes
	sample5: 187 rank invariant genes
	sample6: 95 rank invariant genes

HTqPCR documentation built on Nov. 8, 2020, 6:51 p.m.