Learn R Programming

aroma.cn (version 0.8.2)

normalizeBAFsByRegions.PairedPSCBS: Normalizes allele B fractions (BAFs) based on region-based PSCN estimates

Description

Normalizes allele B fractions (BAFs) based on region-based PSCN estimates as given by the PSCBS segmentation method.

Usage

## S3 method for class 'PairedPSCBS':
normalizeBAFsByRegions(fit, by=c("betaTN", "betaT"), ..., force=FALSE, cache=TRUE, verbose=FALSE)

Arguments

fit
A PairedPSCBS fit object as returned by segmentByPairedPSCBS.
by
A character string specifying if the normalization function should be estimated based on TumorBoost normalized or non-normalized tumor allele B fractions (BAFs).
...
Additional arguments passed normalizeMirroredBAFsByRegions.
verbose
See Verbose.

Value

  • Returns a PairedPSCBS fit object where the region-level decrease-in-heterozygosity (DH) means have been normalized, as well as the locus-specific tumor allele B fractions.

Details

Note that his normalization method depends on the segmentation results. Hence, it recommended not to resegment the normalized signals returned by this, because such a segmentation will be highly dependent on the initial segmentation round.

See Also

Internally normalizeMirroredBAFsByRegions is used.

Examples

Run this code
if (require("PSCBS")) {

# Load example ASCN data
pathname <- system.file("data-ex/PairedPSCBS,exData,chr01.Rbin", package="PSCBS");
data <- R.utils::loadObject(pathname);
R.oo::attachLocally(data);
x <- position;

# AD HOC: Robustification
CT[CT < 0] <- 0;
CT[CT > 30] <- 30;

# PSCBS segmentation
fit <- segmentByPairedPSCBS(CT, betaT=betaT, betaN=betaN, x=x, verbose=-10);

# Normalize
fitN <- normalizeBAFsByRegions(fit, verbose=-10);

devSet("tracks");
subplots(10, ncol=2, byrow=FALSE);
par(mar=c(1,3.5,1,0.5)+1);
plot(fit, subplots=TRUE);
plot(fitN, subplots=TRUE);


devSet("C1C2");
Clim <- c(0,4);
subplots(4, ncol=2, byrow=TRUE);
par(mar=c(1,3.5,1,0.5)+1);
plotC1C2(fit, Clim=Clim);
linesC1C2(fit);
title(main="(C1,C2)");

plotC1C2(fitN, Clim=Clim);
linesC1C2(fitN);
title(main="(C1,C2) - adjusted");

plotC1C2(fit, col="gray", Clim=Clim);
linesC1C2(fit, col="gray");
pointsC1C2(fitN);
linesC1C2(fitN);
title(main="(C1,C2) - both");

} # if (require("PSCBS"))

Run the code above in your browser using DataLab