data(Mtb80)
# simulate 44% of genes to be essential
essential <- rep(0,nrow(Mtb80))
essential[sample(1:nrow(Mtb80),ceiling(nrow(Mtb80)*0.44))] <- 1
# simulate 759 mutants
counts <- sim.mutants(Mtb80[,1], essential, Mtb80[,2], 759)
# run the Gibbs sampler without returning detailed output
if (FALSE) output <- negenes(Mtb80[,1], counts[,1], Mtb80[,2], counts[,2])
output <- negenes(Mtb80[,1], counts[,1], Mtb80[,2], counts[,2],
n.mcmc=100, skip=0, burnin=0)
# run the Gibbs sampler, returning the detailed output
if (FALSE) output2 <- negenes(Mtb80[,1], counts[,1], Mtb80[,2], counts[,2], return=TRUE)
output2 <- negenes(Mtb80[,1], counts[,1], Mtb80[,2], counts[,2], return=TRUE,
n.mcmc=100, skip=0, burnin=0)
Run the code above in your browser using DataLab