Last data update: 2014.03.03

R: Calculate the posterior probability for integer copy numbers.
posteriorProbabilityR Documentation

Calculate the posterior probability for integer copy numbers.

Description

Calculate the posterior probability for integer copy numbers using the bivariate normal prediction regions.

Usage

posteriorProbability(object, predictRegion, copyNumber = 0:4, w)

Arguments

object

A CNSet object.

predictRegion

A list containing the bivariate normal prediction region for each of the possible genotypes.

copyNumber

Integer vector.

w

numeric vector of prior probabilities for each of the copy number states. Must be the same length as copyNumber and sum to 1.

Details

This is currently under development.

Value

An array (features x samples x copy number)

Note

This is under development. Use at your own risk.

Author(s)

R. Scharpf

See Also

predictionRegion, genotypes

Examples

data(cnSetExample)
pr <- predictionRegion(cnSetExample, copyNumber=0:4)
pp <- posteriorProbability(cnSetExample, predictRegion=pr)
dim(pp)

## multiple batches
data(cnSetExample2)
pr <- predictionRegion(cnSetExample2, copyNumber=0:4)
pp <- posteriorProbability(cnSetExample2, predictRegion=pr)

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/posteriorProbability.Rd_%03d_medium.png", width=480, height=480)
> ### Name: posteriorProbability
> ### Title: Calculate the posterior probability for integer copy numbers.
> ### Aliases: posteriorProbability posteriorProbability,CNSet-method
> ### Keywords: array
> 
> ### ** Examples
> 
> data(cnSetExample)
> pr <- predictionRegion(cnSetExample, copyNumber=0:4)
> pp <- posteriorProbability(cnSetExample, predictRegion=pr)
> dim(pp)
Features  Samples          
   15000        2        5 
> 
> ## multiple batches
> data(cnSetExample2)
> pr <- predictionRegion(cnSetExample2, copyNumber=0:4)
> pp <- posteriorProbability(cnSetExample2, predictRegion=pr)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>