pruneBySdUndo.CBS: Prune the CBS profile by dropping change points that are too...

Description Usage Arguments Details Value Author(s) Examples

Description

Prune the CBS profile by dropping change points that are too small, where "too small" means that the amplitude of the change points is less than a multiple of the overall standard deviation of the copy-number signals.

Usage

1
2
## S3 method for class 'CBS'
pruneBySdUndo(fit, rho=3, sigma="DNAcopy", ..., verbose=FALSE)

Arguments

fit

A CBS object.

rho

A positive double scalar specifying the number of standard deviations (rho*sigma) required in order to keep a change point. More change points are dropped the greater this value is.

sigma

The whole-genome standard deviation of the locus-level copy number signals. The default is to calculate it from the data and as done in the DNAcopy package.

...

(Optional) Additional arguments passed to the standard deviation estimator function.

verbose

See Verbose.

Details

This method corresponds to using the undo argument when calling segmentByCBS(), which in turn corresponds to using the undo.splits="sdundo" and undo.SD of the underlying segment method.

Value

Returns a CBS object (of the same class as fit).

Author(s)

Henrik Bengtsson, Pierre Neuvial

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
28
29
30
31
32
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Simulating copy-number data
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
set.seed(0xBEEF)

# Number of loci
J <- 1000

mu <- double(J)
mu[1:100] <- mu[1:100] + 0.3
mu[200:300] <- mu[200:300] + 1
mu[350:400] <- NA # centromere
mu[650:800] <- mu[650:800] - 1
eps <- rnorm(J, sd=1/2)
y <- mu + eps
x <- sort(runif(length(y), max=length(y))) * 1e5
w <- runif(J)
w[650:800] <- 0.001


# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Segmentation
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fit <- segmentByCBS(y, x=x)
print(fit)
plotTracks(fit)

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Post-segmentation pruning
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
fitP <- pruneBySdUndo(fit, rho=1)
drawLevels(fitP, col="red")

PSCBS documentation built on Oct. 23, 2021, 9:09 a.m.