The main function for performing comparisons among differential expression methods and generating a report in HTML format. It is assumed that all differential expression results have been generated in advance (using e.g. the function
runDiffExp) and that the result
compData object for each data set and each differential expression method is saved separately in files with the extension
.rds. Note that the function can also be called via the
runComparisonGUI function, which lets the user set parameters and select input files using a graphical user interface.
A data frame with at least a column
A list containing parameters for the comparison study. The following entries are supported, and used by different comparison methods:
The directory where the results should be written. The subdirectory structure will be created automatically. If the directory already exists, it will be overwritten.
Logical, should the input table be checked for consistency. Default
The width of the figures in the final report. Will be passed on to
The input to
runComparison is a data frame with at least a column named
input.files, containing paths to
.rds files containing result objects (of the class
compData), such as those generated by
runDiffExp. Other columns that can be included in the data frame are
de.methods. They have to match the information contained in the corresponding result objects. If these columns are not present, they will be added to the data frame automatically.
The function will create a comparison report, named compcodeR_report<timestamp>.html, in the
output.directory. It will also create subfolders named
compcodeR_figure, where the code used to perform the differential expression analysis and the figures contained in the report, respectively, will be stored. Note that if these directories already exists, they will be overwritten.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
tmpdir <- normalizePath(tempdir(), winslash = "/") mydata.obj <- generateSyntheticData(dataset = "mydata", n.vars = 1000, samples.per.cond = 5, n.diffexp = 100, output.file = file.path(tmpdir, "mydata.rds")) runDiffExp(data.file = file.path(tmpdir, "mydata.rds"), result.extent = "voom.limma", Rmdfunction = "voom.limma.createRmd", output.directory = tmpdir, norm.method = "TMM") runDiffExp(data.file = file.path(tmpdir, "mydata.rds"), result.extent = "edgeR.exact", Rmdfunction = "edgeR.exact.createRmd", output.directory = tmpdir, norm.method = "TMM", trend.method = "movingave", disp.type = "tagwise") file.table <- data.frame(input.files = file.path(tmpdir, c("mydata_voom.limma.rds", "mydata_edgeR.exact.rds")), stringsAsFactors = FALSE) parameters <- list(incl.nbr.samples = 5, incl.replicates = 1, incl.dataset = "mydata", incl.de.methods = NULL, fdr.threshold = 0.05, tpr.threshold = 0.05, typeI.threshold = 0.05, ma.threshold = 0.05, fdc.maxvar = 1500, overlap.threshold = 0.05, fracsign.threshold = 0.05, mcc.threshold = 0.05, nbrtpfp.threshold = 0.05, comparisons = c("auc", "fdr", "tpr", "ma", "correlation")) runComparison(file.table = file.table, parameters = parameters, output.directory = tmpdir)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.