Description Usage Arguments Details Value Author(s) Examples
View source: R/runComparison.R
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.
1 2 3 4 5 6 7 | runComparison(
file.table,
parameters,
output.directory,
check.table = TRUE,
out.width = NULL
)
|
file.table |
A data frame with at least a column |
parameters |
A list containing parameters for the comparison study. The following entries are supported, and used by different comparison methods:
|
output.directory |
The directory where the results should be written. The subdirectory structure will be created automatically. If the directory already exists, it will be overwritten. |
check.table |
Logical, should the input table be checked for consistency. Default |
out.width |
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 datasets
, nbr.samples
, repl
and 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_code
and 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.
Charlotte Soneson
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | 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"))
if (interactive()) {
runComparison(file.table = file.table, parameters = parameters, output.directory = tmpdir)
}
|
Loading required package: sm
Package 'sm', version 2.2-5.6: type help(sm) for summary information
Registered S3 method overwritten by 'gplots':
method from
reorder.factor gdata
Warning messages:
1: no DISPLAY variable so Tk is not available
2: replacing previous import ‘gdata::reorder.factor’ by ‘gplots::reorder.factor’ when loading ‘compcodeR’
processing file: tempcode.Rmd
|
| | 0%
|
|................................... | 50%
ordinary text without R code
|
|......................................................................| 100%
label: unnamed-chunk-1 (with options)
List of 6
$ echo : logi TRUE
$ eval : logi TRUE
$ include: logi TRUE
$ message: logi FALSE
$ error : logi TRUE
$ warning: logi TRUE
Loading required package: limma
Loading required package: edgeR
output file: tempcode.md
[1] TRUE
processing file: tempcode.Rmd
|
| | 0%
|
|................................... | 50%
ordinary text without R code
|
|......................................................................| 100%
label: unnamed-chunk-1 (with options)
List of 6
$ echo : logi TRUE
$ eval : logi TRUE
$ include: logi TRUE
$ message: logi FALSE
$ error : logi TRUE
$ warning: logi TRUE
output file: tempcode.md
[1] TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.