cnv: CNV object

Description Usage Arguments Details Value References See Also Examples

View source: R/cnv.R

Description

cnv creates a 'cnv' object is returns TRUE if x is of class 'cnv' print gives a summary for an object of class 'cnv' including ... plot plots an object of class 'cnv' ...

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  cnv(x, batches, ...)
  cnvDefault(x, num.copies, num.class, cnv.tol = 0.001, mix.method = "mixdist", 
             check.probs = TRUE,  threshold.0, threshold.k, mu.ini, sigma.ini, pi.ini, 
             cutoffs = NULL, check.alpha = 0.05, check.cnv = TRUE, var.equal)
  cnvBatches(intensities, batches, threshold.0, threshold.k, common.pi = TRUE, ...)
  is.cnv(obj)
  ## S3 method for class 'cnv'
plot(x, ...)
  ## S3 method for class 'cnv'
print(x, digits = 4, ...)

Arguments

x

a vector of CNV intensity signal for each individual, or a matrix with CNV calling probabilities per row

num.copies

vector with copy number status values, i.e, number of copies or a vector of characters indicating loss ('l'), normal ('n') or gain ('g') for example

num.class

integer indicating how many classes CNV contains

cnv.tol

error tolerance when x is a probability matrix and row sums are not identical to one

mix.method

normal mixture fitting method when x is a vector of univariate CNV signal intensities. Current methods are "mixdist" that uses the function mix from the package mixdist, "mclust" that uses de function Mclust from the package mclust and "EMmixt" that uses an internal function EMmixt from the CNVassoc package. The last two are based on Expectation-Maximization procedure and the first one is based on quasi-Newton-Raphson procedure

check.probs

logical. If TRUE it checks weather row sums are equal to one +/- cnv.tol when x is a probability matrix

threshold.0

assigns zero copies (or first copy number status) to all individuals whose CNV signal intensity is lower than threshold.0

threshold.k

assigns k copies (or last copy number status) to all individuals whose CNV signal intensity is bigger than threshold.k

mu.ini

an opcional vector to specify the initial values of means when fitting a normal mixture to CNV intensity signal data

sigma.ini

an opcional vector to specify the initial values of standard deviations when fitting a normal mixture to CNV intensity signal data

pi.ini

an optional vector to specify the initial values of copy number status probabilities when fitting a normal mixture to CNV intensity signal data

cutoffs

a vector indicating the cut-off points to assign the copy number status assign individuals to the individuals according to the categories defined by these cut-off points on CNV intensity signal data

check.alpha

significance level to goodness-of-fit test indicating weather the normal mixture model to CNV intensity data has been fitted appropriately

check.cnv

logical. If TRUE, cnv functions returns and error when normal mixture model does not fit well to the univariate CNV intensity signal data

var.equal

logical. If TRUE, standard deviation are supposed to be the same for all copy number status when fitting univariate CNV intensity signal data

intensities

a vector with the univariate CNV intensity signal data

batches

a vector indicating the batch (leave it missing if no batch effect is present)

common.pi

logical. If TRUE, copy number status probabilities for each individual are computed estimating specific means and standard deviations separately for every batch, but the same population copy number status probabilities for all batches. It is suggested to leave it as TRUE

obj

an object of any class

digits

number of digits when printing a cnv object

...

other arguments passed to cnvDefault, print.default or plot.cnv. The arguments passed to plot.cnvare the same as the ones for the plotSignal function

Details

When argument batches is not specified, then cnvDefault is used, otherwise cnvBatch is called. If univariate CNV intensity signal data is used to create the cnv class object, then one can introduce the batch effect if it necessary. But, if other algorithms have been used previously and the cnv class object is created directly from the CNV calling probabilities matrix, then it is not possible to specify the batch argument. The batch effect is important when cases and controls have been genotyped in different platforms for example. In this situations, the platform should be introduced in the batch argument as a vector indicating which platform every CNV intensity signal data comes from. Generic plot function applied on a 'cnv' class object performs two types of plots whether 'cnv' class object has been created from univariate CNV intensity signal data or whether it has been created directly from a probability matrix provided by any CNV calling algorithm. The first type is a plot similar to the one created by plotSignal function, and the second type is a barplot.

Value

cnv return an object of class 'cnv' with generic function such as print or plot implemented for this kind of objects. is.cnv is a function that returns TRUE of FALSE weather obj is of class 'cnv' or not.

References

Gonzalez JR, Subirana I, Escaramis G, Peraza S, Caceres A, Estivill X and Armengol L. Accounting for uncertainty when assessing association between copy number and disease: a latent class model. BMC Bioinformatics, 2009;10:172.

See Also

CNVassoc, plotSignal

Examples

1
2
3
4
data(dataMLPA)
CNV  <-  cnv(x  =  dataMLPA$Gene2,  threshold.0  =  0.01,  mix.method  =  "mixdist")
CNV
plot(CNV)

CNVassoc documentation built on May 30, 2017, 12:50 a.m.