
Last chance! 50% off unlimited learning
Sale ends in
combinePDFs(QSarrayList, n.points=2^14)
QSlist
, containing the input QSarrayList.
combinePDFs
uses numerical convolution to calculate the combined PDFs for individual pathways, with each individual PDF weighted by the total number of samples used in the comparison. This method is useful for meta-analysis of multiple datasets, or for a meta comparison where the difference between two QuSAGE pdfs is of interest. The results of combinePDFs
can be plotted (on a pathway-by-pathway basis) using the plotCombinedPDF
function, or by simply calling "plot
" on a QSarray object which contains the QSlist field.
##create example data - a set of 500 genes normally distributed across 40 patients
eset = matrix(rnorm(500*40),500,40, dimnames=list(1:500,1:40))
labels = rep(c("A","B","C","D"),each=10)
##create a number of gene sets with varying levels of differential expression.
geneSets = list()
for(i in 0:10){
genes = ((30*i)+1):(30*(i+1))
eset[genes,labels=="B"] = eset[genes,labels=="B"] + 2 + rnorm(1)
eset[genes,labels=="D"] = eset[genes,labels=="D"] + 1 + rnorm(1)
geneSets[[paste("Set",i)]] = genes
}
##calculate qusage results
qsList = lapply(c("B-A","D-C"), function(comparison){
qusage(eset,labels, comparison, geneSets)
})
##combine the two QSarrays
qsComb = combinePDFs(qsList)
plot(qsComb, path.index=1)
Run the code above in your browser using DataLab