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

normalizeBAFsByRegions.PairedPSCBSR Documentation

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.

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.

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.

Author(s)

Henrik Bengtsson, Pierre Neuvial

See Also

Internally normalizeMirroredBAFsByRegions is used.

Examples

library("aroma.cn")

if (Sys.getenv("_R_CHECK_FULL_") != "" && require("PSCBS")) {

# Load example ASCN data
data <- PSCBS::exampleData("paired.chr01")
R.oo::attachLocally(data)

# 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"))

HenrikBengtsson/aroma.cn documentation built on Feb. 20, 2024, 9:15 p.m.