# See vignette for more examples.
# If we do not wish to parallelise the functions we set the cluster
# object to NULL.
cl <- NULL
# Alternatively, if we have the 'snow' package installed we
# can parallelise the functions. This will usually (not always) offer
# significant performance gain.
## Not run: try(library(snow))
## Not run: try(cl <- makeCluster(4, "SOCK"))
# load test data
data(simData)
# Create a {countData} object from test data.
replicates <- c("simA", "simA", "simA", "simA", "simA", "simB", "simB", "simB", "simB", "simB")
groups <- list(NDE = c(1,1,1,1,1,1,1,1,1,1), DE = c(1,1,1,1,1,2,2,2,2,2))
CD <- new("countData", data = simData, replicates = replicates, groups = groups)
#estimate library sizes for countData object
libsizes(CD) <- getLibsizes(CD)
# Get priors for negative binomial method
CDPriors <- getPriors.NB(CD, samplesize = 10^5, estimation = "QL", cl = cl)
Run the code above in your browser using DataLab