Learn R Programming

CNAnorm (version 1.18.0)

peakPloidy: Methods for Function peakPloidy in Package `CNAnorm'

Description

peakPloidy Estimate most likely ploidy of genome looking at distribution of smoothed ratio.

Usage

"peakPloidy"(object, method = 'mixture', exclude = character(0), ploidyToTest = 12, sd = 5, dThresh = 0.01, n = 2048, adjust = .9, force.smooth = TRUE, reg = FALSE, ds = 1.5, zero.cont = FALSE, ...)

Arguments

object
An object of Class "CNAnorm"
exclude
A character vector with names of Chromosomes/Contigs not to use to estimate ploidy.
method
A character element matching either "mixture", "density", "median", "mode" or "closest". "mixture" will fit a mixture model to find peaks; "density" will use the density function to find peaks; "median" "mode" and "closest" will only find one peak at the median, mode or peak closest to the median respectively. No tumour content or reliable estimated ploidy will be provided. These methods are ment to perform a more ``standard'' normalisation, without stratching the data. Suggested for germline CNV or a fully automated process that does not requires a normalisation on integer copy number or for highly heterogeneous sample where such normalisation would not be possible. Non ambigous partial matches can be used.
ploidyToTest
Maximum ploidy allowed. Warnings! Computation time increases exponentially with this parameter if using "density".
adjust
The "adjust" parameter passed to the density function.
n
The "n" parameter passed to the density function.
force.smooth
If the input object does not have smoothed ratio, it will smooth using "addSmooth". It is highly recomended to use "force.smooth = TRUE"
sd
Parameter to filter outliers. Values greater than i median + sd * standard deivations will be ignored while detecting peaks and ploidy.
dThresh
Parameter to filter outliers. Values with a density lower than max(density)*dThresh will be ignored while detecting peaks and ploidy.
reg
Parameter for mixture model: If set TRUE, the starting point for EM algorithm will be optimized through several methods including regular grid on the ratio distribution. The default is FALSE, by which the starting values are taken from the quantiles of the distribution.
ds
Parameter for mixture model: A constraint in EM algorithm of minimum distance between mean estimates, in terms of median standard deviation of the mixture components.
zero.cont
Parameter for mixture model: An argument for the mixture model. If set TRUE, the EM algorithm considers exactly-zero ratios as a mixture component.
...
Extra parameters to be passed to funtions for peak detection, specific to each of the methods (deinsity or mixture), se below for details.

Value

"CNAnorm"

References

Gusnanto, A., Wood, H.M., Pawitan, Y., Rabbitts, P. and Berri, S. (2011) Correcting for cancer genome size and tumour cell content enables better estimation of copy number alterations from next generation sequence data. Bioinformatics

See Also

CNAnorm-class, density

Examples

Run this code
data(LS041)
CN <- dataFrame2object(LS041)
chr2skip <- c("chrY", "chrM")
CN <- gcNorm(CN, exclude = chr2skip)
CN <- addSmooth(CN, lambda = 3)
CN <- peakPloidy(CN, exclude = chr2skip)
# this object CN is what you obtain when you load 
# data(CN)

Run the code above in your browser using DataLab