Last data update: 2014.03.03

R: Prediction regions for integer copy number
predictionRegionR Documentation

Prediction regions for integer copy number

Description

Bivariate normal prediction regions for integer copy number. Copy numbers 0-4 allowed.

Usage

predictionRegion(object, copyNumber)

Arguments

object

A CNSet object.

copyNumber

Integer vector. 0-4 allowed.

Details

We fit a linear regression for each allele to the diallic genotype cluster medians. Denoting the background and slope by nu and phi, respectively, the mean for the bivariate normal prediction region is given by

mu_A = nu_A + CA * phi_A

and

mu_B nu_B + CB * phi_B

The variance and correlation of the normalized intensities is estimated from the diallelic genotype clusters AA, AB, and BB on the log-scale. For copy number not equal to two, we assume that the variance is approximately the same for copy number not equal to 2.

Value

A list named by the genotype. ‘NULL’ refers to copy number zero, ‘A’ is a hemizygous deletion, etc. Each element is a list of the means (mu) and covariance (cov) for each marker stored as an array. For ‘mu’, the dimensions of the array are marker x allele (A or B) x batch. For ‘cov’, the dimensions of the array are marker x 3 (varA, cor, and varB) x batch.

Author(s)

R. Scharpf

References

Scharpf et al., 2011, Biostatistics.

See Also

posteriorProbability, genotypes

Examples

data(cnSetExample)
pr <- predictionRegion(cnSetExample, copyNumber=0:4)
names(pr)
## bivariate normal prediction region for NULL genotype (homozygous deletion)
str(pr[["NULL"]])

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(crlmm)
Loading required package: oligoClasses
Welcome to oligoClasses version 1.34.0
Loading required package: preprocessCore
Welcome to crlmm version 1.30.0
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/crlmm/predictionRegion.Rd_%03d_medium.png", width=480, height=480)
> ### Name: predictionRegion
> ### Title: Prediction regions for integer copy number
> ### Aliases: predictionRegion predictionRegion,CNSet,integer-method
> ### Keywords: distribution list
> 
> ### ** Examples
> 
> data(cnSetExample)
> pr <- predictionRegion(cnSetExample, copyNumber=0:4)
> names(pr)
 [1] "NULL" "A"    "B"    "AA"   "AB"   "BB"   "AAA"  "AAB"  "ABB"  "BBB" 
[11] "AAAA" "AAAB" "AABB" "ABBB" "BBBB"
> ## bivariate normal prediction region for NULL genotype (homozygous deletion)
> str(pr[["NULL"]])
List of 2
 $ mu : num [1:15000, 1:2, 1] 7.08 7.59 7.86 8.35 10.17 ...
  ..- attr(*, "dimnames")=List of 3
  .. ..$ : NULL
  .. ..$ : chr [1:2] "A" "B"
  .. ..$ : chr "SHELF"
 $ cov: num [1:15000, 1:3, 1] 0.0179 0.0349 0.0166 0.014 0.0124 ...
  ..- attr(*, "dimnames")=List of 3
  .. ..$ : NULL
  .. ..$ : chr [1:3] "varA" "cor" "varB"
  .. ..$ : chr "SHELF"
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>