Read posterior means and classification probabilities from BGmix

Share:

Description

Reads output files containing posterior means from BGmix AND reads posterior probabilities of each gene being classified in the null mixture component.

Usage

1
ccParams(filedir, q.beta = T, q.sig = T, q.z = T, quiet = T)

Arguments

filedir

character. The name of the output directory created by BGmix.

q.beta

logical. Read beta values?

q.sig

logical. Read gene variance parameters?

q.z

logical. Read z values?

quiet

logical. Parameter passed to 'scan'. (If false, 'scan' prints details of number of items read in.)

Value

mbeta

matrix no. genes x no. effects. Posterior means of gene effect parameters (usually gene means and log fold changes).

msig2

matrix no. genes x no. variances. Posterior means of gene variances.

mbb

vector of hyperparameters (b) for gene variances (posterior means).

maa

vector of hyperparameters (a) for gene variances (posterior means).

mtau

matrix no. genes x no. conditions. Posterior means of gene precisions.

mwtc

vector of posterior mean mixture weights

mzg

vector of posterior mean allocation for each gene

meta

vector of mixture parameters (eta)

mlambda

vector of mixture parameters (lambda)

pc

matrix no. genes x no. mixture components. Posterior probability for each gene of being classified into each mixture component.

Author(s)

Alex Lewin

Examples

1
2
3
4
5
## Note this is a very short MCMC run!
## For good analysis need proper burn-in period.
data(ybar,ss)
outdir <- BGmix(ybar, ss, c(8,8), nburn=0, niter=100, nthin=1)
params <- ccParams(outdir)