R: Normalizes allele B fractions for a tumor given a match...
normalizeTumorBoost
R Documentation
Normalizes allele B fractions for a tumor given a match normal
Description
TumorBoost [1] is a normalization method that normalizes the allele B
fractions of a tumor sample given the allele B fractions and genotypes
of a matched normal.
The method is a single-sample (single-pair) method.
It does not require total copy-number estimates.
The normalization is done such that the total copy number is
unchanged afterwards.
Usage
## S3 method for class 'numeric'
normalizeTumorBoost(betaT, betaN, muN=callNaiveGenotypes(betaN), preserveScale=FALSE,
flavor=c("v4", "v3", "v2", "v1"), ...)
Arguments
betaT, betaN
Two numericvectors each of length J with
tumor and normal allele B fractions, respectively.
muN
An optional vector of length J containing
normal genotypes calls in (0,1/2,1,NA) for (AA,AB,BB).
preserveScale
If TRUE, SNPs that are heterozygous in the
matched normal are corrected for signal compression using an estimate
of signal compression based on the amount of correction performed
by TumorBoost on SNPs that are homozygous in the matched normal.
flavor
A character string specifying the type of
correction applied.
...
Not used.
Details
Allele B fractions are defined as the ratio between the allele B signal
and the sum of both (all) allele signals at the same locus.
Allele B fractions are typically within [0,1], but may have a slightly
wider support due to for instance negative noise.
This is typically also the case for the returned normalized
allele B fractions.
Value
Returns a numericvector of length J containing the normalized
allele B fractions for the tumor.
Attribute modelFit is a list containing model fit parameters.
Flavors
This method provides a few different "flavors" for normalizing the
data. The following values of argument flavor are accepted:
v4: (default) The TumorBoost method, i.e. Eqns. (8)-(9) in [1].
v3: Eqn (9) in [1] is applied to both heterozygous and homozygous
SNPs, which effectly is v4 where the normalized allele B
fractions for homozygous SNPs becomes 0 and 1.
v2: ...
v1: TumorBoost where correction factor is forced to one, i.e.
η_j=1. As explained in [1], this is a suboptimal
normalization method. See also the discussion in the
paragraph following Eqn (12) in [1].
Preserving scale
As of aroma.light v1.33.3 (March 30, 2014),
argument preserveScale no longer has a default value and has
to be specified explicitly. This is done in order to change the
default to FALSE in a future version, while minizing the risk
for surprises.
Allele B fractions are more or less compressed toward a half, e.g.
the signals for homozygous SNPs are slightly away from zero and one.
The TumorBoost method decreases the correlation in allele B fractions
between the tumor and the normal conditioned on the genotype.
What it does not control for is the mean level of the allele B fraction
conditioned on the genotype.
By design, most flavors of the method will correct the homozygous SNPs
such that their mean levels get close to the expected zero and
one levels. However, the heterozygous SNPs will typically keep the
same mean levels as before.
One possibility is to adjust the signals such as the mean levels of
the heterozygous SNPs relative to that of the homozygous SNPs is
the same after as before the normalization.
If argument preserveScale=TRUE, then SNPs that are heterozygous
(in the matched normal) are corrected for signal compression using
an estimate of signal compression based on the amount of correction
performed by TumorBoost on SNPs that are homozygous
(in the matched normal).
The option of preserving the scale is not discussed in the
TumorBoost paper [1], which presents the preserveScale=FALSE
version.
Author(s)
Henrik Bengtsson, Pierre Neuvial
References
[1] H. Bengtsson, P. Neuvial and T.P. Speed, TumorBoost: Normalization of allele-specific tumor copy numbers from a single pair of tumor-normal genotyping microarrays, BMC Bioinformatics, 2010, 11:245. [PMID 20462408]
Examples
library(R.utils)
# Load data
pathname <- system.file("data-ex/TumorBoost,fracB,exampleData.Rbin", package="aroma.light")
data <- loadObject(pathname)
attachLocally(data)
pos <- position/1e6
muN <- genotypeN
layout(matrix(1:4, ncol=1))
par(mar=c(2.5,4,0.5,1)+0.1)
ylim <- c(-0.05, 1.05)
col <- rep("#999999", length(muN))
col[muN == 1/2] <- "#000000"
# Allele B fractions for the normal sample
plot(pos, betaN, col=col, ylim=ylim)
# Allele B fractions for the tumor sample
plot(pos, betaT, col=col, ylim=ylim)
# TumorBoost w/ naive genotype calls
betaTN <- normalizeTumorBoost(betaT=betaT, betaN=betaN, preserveScale=FALSE)
plot(pos, betaTN, col=col, ylim=ylim)
# TumorBoost w/ external multi-sample genotype calls
betaTNx <- normalizeTumorBoost(betaT=betaT, betaN=betaN, muN=muN, preserveScale=FALSE)
plot(pos, betaTNx, col=col, ylim=ylim)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(aroma.light)
aroma.light v3.2.0 (2016-01-06) successfully loaded. See ?aroma.light for help.
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/aroma.light/normalizeTumorBoost.Rd_%03d_medium.png", width=480, height=480)
> ### Name: normalizeTumorBoost
> ### Title: Normalizes allele B fractions for a tumor given a match normal
> ### Aliases: normalizeTumorBoost normalizeTumorBoost.numeric
> ### Keywords: methods
>
> ### ** Examples
>
> library(R.utils)
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.20.0 (2016-02-17) successfully loaded. See ?R.oo for help.
Attaching package: 'R.oo'
The following objects are masked from 'package:methods':
getClasses, getMethods
The following objects are masked from 'package:base':
attach, detach, gc, load, save
R.utils v2.3.0 (2016-04-13) successfully loaded. See ?R.utils for help.
Attaching package: 'R.utils'
The following object is masked from 'package:utils':
timestamp
The following objects are masked from 'package:base':
cat, commandArgs, getOption, inherits, isOpen, parse, warnings
>
> # Load data
> pathname <- system.file("data-ex/TumorBoost,fracB,exampleData.Rbin", package="aroma.light")
> data <- loadObject(pathname)
> attachLocally(data)
> pos <- position/1e6
> muN <- genotypeN
>
> layout(matrix(1:4, ncol=1))
> par(mar=c(2.5,4,0.5,1)+0.1)
> ylim <- c(-0.05, 1.05)
> col <- rep("#999999", length(muN))
> col[muN == 1/2] <- "#000000"
>
> # Allele B fractions for the normal sample
> plot(pos, betaN, col=col, ylim=ylim)
>
> # Allele B fractions for the tumor sample
> plot(pos, betaT, col=col, ylim=ylim)
>
> # TumorBoost w/ naive genotype calls
> betaTN <- normalizeTumorBoost(betaT=betaT, betaN=betaN, preserveScale=FALSE)
> plot(pos, betaTN, col=col, ylim=ylim)
>
> # TumorBoost w/ external multi-sample genotype calls
> betaTNx <- normalizeTumorBoost(betaT=betaT, betaN=betaN, muN=muN, preserveScale=FALSE)
> plot(pos, betaTNx, col=col, ylim=ylim)
>
>
>
>
>
> dev.off()
null device
1
>