Learn R Programming

cghseg (version 1.0.5)

getuniKmax: Maximum number of segments per profile

Description

Maximum number of segments per profile according to a given proportion of the length of the data using a univariate pre-segmentation.

Usage

getuniKmax(.Object,CGHo,uniKmax=NULL)

Arguments

.Object

an object of the CGHdata class

CGHo

an object of the CGHoption class

uniKmax

NULL if no value is proposed, list of Kmax for each profile

Value

uniKmax

list containing the maximum number of segments per profile. If !is.null(uniKmax) in the entry of the method, the method checks its validity.

Details

CGHo["alpha"] sets the proportion of length of each profile that will be used for pre-segmentation. If ni is the length of profile i then the pre-segmentation is done using a Kmax=max(200,alpha n_i). Pre-segmentation is done to propose a number of segments Khi for each profile i. Then the maximum number of segments authorized per profile will be 2*Khi. The speed of execution of the method decreases with Kmax. Each Kmax must fulfill some conditions wrt CGHo: $$\code{uniKmax[[i]]} > \code{nblevels}$$ $$\code{uniKmax[[i]]}< n_i$$ Tuning Khi for each profile is a way to reduce the complexity of the multisample segmentation.

References

Joint segmentation, calling and normalization of multiple CGH profiles, Biostatistics (2011)

Examples

Run this code
# NOT RUN {
set.seed(1)
simul = simulprofiles(M=5,n=100,k.mean=2,SNR=5,lambda=1)
CGHd  = new("CGHdata",Y=simul$Y)
CGHo  = new("CGHoptions")

## Default initialization

uniKmax = getuniKmax(CGHd,CGHo)

## Modification of all fields:
## to tune uniKmax using to 50% of the length of each profile :
## this may provide the same result since a model selection is performed
## for tuning.
alpha(CGHo) = 0.5
uniKmax     = getuniKmax(CGHd,CGHo)

## Modification of one field for one profile
## and check that the value is correct wrt options

uniKmax[[1]] = 80
uniKmax      = getuniKmax(CGHd,CGHo,uniKmax)
# }

Run the code above in your browser using DataLab