Learn R Programming

jointseg (version 1.0.2)

doCBS: Run CBS segmentation

Description

This function is a wrapper for convenient use of the CBS segmentation method by PSSeg. It applies the segment function and reshapes the results

Usage

doCBS(y, ..., verbose = FALSE)

Arguments

y

A numeric vector, the signal to be segmented

Arguments to be passed to segment

verbose

A logical value: should extra information be output ? Defaults to FALSE.

Value

A list with a single element:

bkp

breakpoint positions

See Also

segment

Examples

Run this code
# NOT RUN {
## load known real copy number regions
affyDat <- acnr::loadCnRegionData(dataSet="GSE29172", tumorFraction=1)

## generate a synthetic CN profile
K <- 10
len <- 1e4
sim <- getCopyNumberDataByResampling(len, K, minLength=100, regData=affyDat)
datS <- sim$profile

## run CBS segmentation
res <- doCBS(datS[["c"]])
getTpFp(res$bkp, sim$bkp, tol=5, relax = -1)   ## true and false positives
plotSeg(datS, breakpoints=list(sim$bkp, res$bkp))
# }

Run the code above in your browser using DataLab