SummarizedBenchmark: Create a new SummarizedBenchmark object

Description Usage Arguments Value Author(s) Examples

View source: R/SummarizedBenckmark-constructor.R

Description

Function to construct SummarizedBenchmark objects.

Usage

1
2
SummarizedBenchmark(assays, colData, ftData = NULL, groundTruth = NULL,
  performanceMetrics = NULL, BenchDesign = NULL, ...)

Arguments

assays

A list containing outputs of the methods to be benchmark. Each element of the list must contain a matrix or data.frame of n x m, n being the number of features tested (e.g. genes) and m being the number of methods in the benchmark. Each element of the list must contain a single assay (the outputs of the methods). For example, for a benchmark of differential expression methods, one assay could contain the q-values from the different methods and another assay could be the estimated log fold changes.

colData

A DataFrame describing the annotation of the methods. These could include version of the software or the parameters used to run them.

ftData

A DataFrame object describing the rows. This parameter is equivalent to the parameter rowData of a SummarizedExperiment.

groundTruth

If present, a DataFrame containing the ground truths. If provided, the number of columns must be the same as the number of assays (NA's are accepted). The names of the columns should have the same names as the assays.

performanceMetrics

A SimpleList of the same length as the number of assays. Each element of the list must be a list of functions. Each function must contain the parameters 'query' and 'truth'.

BenchDesign

A BenchDesign containing the code used to construct the object. (default = NULL)

...

Additional parameters passed to SummarizedExperiment.

Value

A SummarizedBenchmark object.

Author(s)

Alejandro Reyes

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## loading the example data from iCOBRA
library(iCOBRA)
data(cobradata_example)

## a bit of data wrangling and reformatting
assays <- list(
    qvalue=cobradata_example@padj,
    logFC=cobradata_example@score )
assays[["qvalue"]]$DESeq2 <- p.adjust(cobradata_example@pval$DESeq2, method="BH")
groundTruth <- DataFrame( cobradata_example@truth[,c("status", "logFC")] )
colnames(groundTruth) <- names( assays )
colData <- DataFrame( method=colnames(assays[[1]]) )
groundTruth <- groundTruth[rownames(assays[[1]]),]

## constructing a SummarizedBenchmark object
sb <- SummarizedBenchmark(
    assays=assays, colData=colData,
    groundTruth=groundTruth )
colData(sb)$label <- rownames(colData(sb))

areyesq89/SummarizedBenchmark documentation built on Sept. 2, 2021, 4:15 p.m.