# See vignette for more examples.
# load test data
data(simData)
# replicate structure of data
replicates <- c("simA", "simA", "simA", "simA", "simA", "simB", "simB", "simB", "simB", "simB")
# define hypotheses on data
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))
# construct 'countData' object
CD <- new("countData", data = simData, replicates = replicates, groups =
groups)
#estimate library sizes for countData object
libsizes(CD) <- getLibsizes(CD)
# estimate prior distributions on 'countData' object using negative binomial
# method. Other methods are available - see getPriors
CDPriors <- getPriors.NB(CD, cl = NULL)
# estimate posterior likelihoods for each row of data belonging to each hypothesis
CDPost <- getLikelihoods(CDPriors, cl = NULL)
# display the rows of data showing greatest association with the second
# hypothesis (differential expression)
topCounts(CDPost, group = "DE", number = 10)
# find true positive selection rate
getTPs(CDPost, group = "DE", TPs = 1:100)[1:100]
Run the code above in your browser using DataLab