DPfitSamples: MCMC fitting of sAGP values

Description Usage Arguments Value Author(s) Examples

Description

This function is a wrapper for getDPfit() by analyzing batch samples for sAGP values.

Usage

1
DPfitSamples(dd, alpha = 0.05, low.thr = 0.05, min.peaksize = 10, prior, mcmc, nt=FALSE)

Arguments

dd

numeric matrix, returned from getsAGP or getSegPurity()

alpha

significant level.

low.thr

values below this threshold in sAGP will be omitted.

min.peaksize

minimum number of segments each peak must contain.

prior

a list of prior parameters required for DPdensity. An example is data(prior).

mcmc

a list of parameters required to run MCMC for DPdensity. An example is data(mcmc).

nt

logical. If TRUE, multi-thread processing is performed.

Value

A list containing the following elements:

DD

input dd with additional peak information.

Labels

a vector assigning each sample to model 0, 1 or 2. See getDPfit() for more details.

Pval

P value

par

parameters fitted for the distribution of sAGP value from each sample.

Author(s)

Bo Li

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
data(A0SD.BAF)
data(A0SD.LRR)
## DNA segmentation
seg.dat=c()
for(CHR in c(8,9,10)){
	baf=A0SD.BAF[A0SD.BAF[,2]==CHR,]
	lrr=A0SD.LRR[A0SD.LRR[,2]==CHR,]
	x=getSegChr(baf,lrr)
	seg.dat=rbind(seg.dat,x)
}
dd.dat=seg.dat[,2:8]
rownames(dd.dat)=seg.dat[,1]
mode(dd.dat)='numeric'
save(dd.dat,file='A0SDseg.Rdata')
para=getPara()
para$datafile='A0SDseg.Rdata'
para$savefile='A0SD-AGP.txt'
para$is.normalize=FALSE
## AGP estimation
getAGP(para=para)
para.s=getPara.sAGP()
para.s$inputdata='A0SDseg.Rdata'
para.s$purityfile='A0SD-AGP.txt'
para.s$savedata='A0SD-sAGP.Rdata'
## sAGP estimation
getsAGP(para=para.s)
## Perform MCMC fitting
load('A0SD-sAGP.Rdata')
data(mcmc)
data(prior)
temp=DPfitSamples(new.dd,prior=prior,mcmc=mcmc)


Search within the CHAT package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.