PurBayes(N, Y, M=NULL, Z=NULL, pop.max=5, prior=NULL, burn.in=50000, n.post = 10000, fn.jags = "PB.jags", plot = FALSE)MNULL, defaults to Uniform(0,1). WARNING: This must be provided as a character string written within the JAGS modeling language.write.PB generates the appropriate JAGS model file. Defaults to 'PB.jags' in the current working directory.plot=TRUE, then plot.PurBayes is called to generate a visual representation of the data along with the model fit by PurBayes. Defaults to FALSE.PurBayes, which includes data inputs N,Y,M,Z, as well as:
mcmc.list object corresponding to posterior samples of PurBayes model parameters. This necessarily includes pur, the tumor purity. If n.pop>1, posterior samples of $\kappa_j$ and $\lambda_j$ for $j = 1,...,J$ are also included.jags) fit in the model selection processThe probability that a given variant corresponds to the $j^{th}$ population is given by $\kappa_j$, and $\bm{\kappa}=(\kappa_1,\ldots,\kappa_J)$ follows a dirichlet prior such that $\pi(\bm{\kappa})\sim Dirichlet(\alpha_1,\,\ldots,\alpha_J)$ for a given variant population quantity $J$. PurBayes applies a diffuse prior on $\bm{\kappa}$, such that $\alpha_1=\ldots=\alpha_J=1$. While the user may specify a particular prior for $\lambda$ under a homogeneous tumor, PurBayes defaults to $\pi(\lambda_j) \sim Uniform(0,1)$ for all j, and uses a sort function to avoid label switching.
The optimality criterion used for model selection with regard to size of $J$ is based upon the penalized expected deviance (Plummer, 2008) In instances where the optimism cannot be determined, it is approximated by twice the pD value (along with a warning this approximation is being used).
\lambda$,>#Homogeneous tumor example
N.var<-20
N<-round(runif(N.var,20,200))
lambda<-0.75
Y<-rbinom(N.var,N,lambda/2)
## Not run: PB.hom<-PurBayes(N,Y)
#Heterogeneous tumor example - 1 subclonal population
N.var<-20
N<-round(runif(N.var,20,200))
lambda.1<-0.75
lambda.2<-0.25
lambda<-c(rep(lambda.1,10),rep(lambda.2,10))
Y<-rbinom(N.var,N,lambda/2)
## Not run: PB.het<-PurBayes(N,Y)
Run the code above in your browser using DataLab