Description Usage Arguments Details
Hierarchical model where each variant belongs to one of five states and each tissue within a variant belongs to one of three (or two) groups
1 2 3 4 |
y.list |
a list of matrices where y.list[[s]] is an m[s] x 2 matrix, of read counts for the two alleles for 'm[s]' tissues. these matrices MUST have rownames so that the tissues can be matched across the variants |
pr.beta |
numeric, specifications for beta prior distributions |
pr.intv |
vector, the three intervals on which priors for thetas are truncated. If NA, then priors are not truncated. |
pr.pi |
numeric, parameters for Dirichlet prior on probability of each of the five states OR if length(pr.pi)=4 then HET0 and HET1 states are combined to a single HET state. If model.strong.ase==TRUE then only values 1,2 and 4 of pr.pi are used. In this case it is also possible to give just three values fro pr.pi. |
niter |
integer, the number of MCMC iterations |
burnin |
integer, number of initial iterations discarder, not included in niter (so sampler runs niter+burnin iters in total) |
independent |
logical, if TRUE then each tissue has its own theta, independent of the other tissues (given the priors above). if FALSE (default) then all tissues in the same group have the same theta |
model.strong.ase |
logical, if TRUE then the tissues can come from three groups, if FALSE from only two |
group.distance |
a vector of length 3 that tells the distances between groups 0-1, 0-2 and 1-2, respectively. these are used to estimate the distances between tissues |
Matti Pirinen 01-Apr-2014, 29-Dec-2014
We use three groups to specify groups for NOASE, MODASE and SNGASE, G0, NOASE: No allele specific expression (ASE), theta is close to 0.5 G1, MODASE: Moderate ASE, theta is different from 0.5 and different from extreme values of 0 and 1 G2, SNGASE, Strong ASE, theta is extreme, near 0 or 1 Priors for allele frequencies in the groups are given by Beta distributions explained below. It is possible to restrict the model to only two groups: NOASE and MODASE.
The combined configuration is classified into 6 states: C1=NOASE (all tissues in G0), C2=MODASE (all tissues in G1), C3=SNGASE (all tissues in G2) C4=HET0 (heterogeneous with at least one tissue in G0) C5=HET1 (heterogeneous with no tissue in G0) C6=TIS_SPE (tissue specific, one tissue is in different group than all the rest which are in a same group) States C1,...,C5 are non-overlapping and exhaustive, while C6 is a subset of C5. Prior probabilities for states C1,...,C5 are ~ Dirichlet(pr.pi) If only two groups are used, then only combined configurations C1,C2,C4 and C6 are possible.
If model.strong.ase==TRUE then the tissues can come from three groups: theta is the frequency of allele in column 1 of y If two.sided is FALSE then G0: theta~Beta(pr.beta[1],pr.beta[2])*I(pr.intv[1],pr.intv[2]) or if pr.beta[1]==pr.beta[2]==NULL then theta=0.5 (point mass at 0.5) G1: theta~Beta(pr.beta[3],pr.beta[4])*I(pr.intv[3],pr.intv[4]) G2: theta~Beta(pr.beta[5],pr.beta[6])*I(pr.intv[5],pr.intv[6]) if two.sided is TRUE then G0: theta~0.5*Beta(pr.beta[1],pr.beta[2])*I(pr.intv[1],pr.intv[2])+0.5*Beta(pr.beta[2],pr.beta[1])*I(pr.intv[2],pr.intv[1]) or if pr.beta[1]==pr.beta[2]==NULL then theta=0.5 G1: theta~0.5*Beta(pr.beta[3],pr.beta[4])*I(pr.intv[3],pr.intv[4])+0.5*Beta(pr.beta[4],pr.beta[3])*I(pr.intv[4],pr.intv[3]) G2: theta~0.5*Beta(pr.beta[5],pr.beta[6])*I(pr.intv[5],pr.intv[6])+0.5*Beta(pr.beta[6],pr.beta[5])*I(pr.intv[6],pr.intv[5]) If model.strong.ase==FALSE then the tissues come from only two groups: G0 and G1. In this case 'pr.beta' and 'pr.intv' can be of length 4, or if they are of length 6 then they are truncated to subvector 1:4.
prior probability of each heterogeneous configuration depends on pi[4] or pi[5] and the distance of the configuration. Distance of a configuration is the smallest number of tissues whose labels need to be changed to turn the configuration into a homogeneous one. (E.g. (0,1,1) and (2,1,2) have d=1 and (0,1,2) has d=2.) If model.strong.ase==TRUE then maximum.distance=m-ceiling(m/3), else maximum.distance=floor(m/2). if model.strong.ase=FALSE or length(pr.pi)==4 then Each configuration (with distance d > 0) will have a prior probability pi[4]/maximum.distance/(No. of configurations with distance=d). Thus two configs with the same distance are equally probable a priori. if length(pr.pi)==5 then there are separate priors for HET0 and HET1 configurations, pi[4](m-ceiling(m/3))/(No. of tissues with distance=d) and pi[5]/(floor(m/2))/(No. of tissues with distance=d), respectively
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.