Learn R Programming

aroma.cn (version 1.5.0)

calibrateC1C2.PairedPSCBS: Calibrates ASCN signals in (C1,C2) space based on region-based PSCN estimates

Description

Calibrates ASCN signals in (C1,C2) space based on region-based PSCN estimates as given by the PSCBS segmentation method.

Usage

## S3 method for class 'PairedPSCBS':
calibrateC1C2(fit, ..., force=FALSE, cache=TRUE, debug=FALSE, verbose=FALSE)

Arguments

fit
A PairedPSCBS fit object as returned by segmentByPairedPSCBS.
...
Not used.
verbose
See Verbose.

Value

  • Returns a calibrated PairedPSCBS fit object.

Examples

Run this code
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
cc <- 1;
ww <- which(data$chromosome == cc);

fit <- segmentByPairedPSCBS(CT[ww], betaT=betaT[ww], betaN=betaN[ww],
                            x=x[ww], chromosome=cc, verbose=-10);
fit <- postsegmentTCN(fit);

# Calibrate in (C1,C2) space
fitC <- calibrateC1C2(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(fitC, 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) - raw");

plotC1C2(fitC, Clim=Clim);
linesC1C2(fitC);
title(main="(C1,C2) - calibrated");

} # if (require("PSCBS"))

Run the code above in your browser using DataLab