evaluateDEA: evaluateDEA

Description Usage Arguments Value Examples

View source: R/dea_evaluationFunctions.R

Description

Evaluates a differential expression analysis (DEA).

Usage

1
evaluateDEA(dea, truth = NULL, th = c(0.01, 0.05, 0.1))

Arguments

dea

Expects a data.frame with logFC and FDR, as produced by 'edgeR::topTags', 'limma::topTable' or 'DESeq2::results'.

truth

A data.frame containing the columns 'expected.beta' (real logFC) and 'isDE' (logical indicating whether there is a difference or not; accepts NA values)

th

The significance thresholds for which to compute the metrics.

Value

A list with two slots: 'logFC' (vector of metrics on logFC) and 'significance' table of significance-related statistics.

Examples

1
2
3
4
5
6
# fake DEA results
dea <- data.frame( row.names=paste0("gene",1:10), logFC=rnorm(10) )
dea$PValue <- dea$FDR <- c(2:8/100, 0.2, 0.5, 1)
truth <- data.frame( row.names=paste0("gene",1:10), expected.beta=rnorm(10),
                     isDE=rep(c(TRUE,FALSE,TRUE,FALSE), c(3,1,2,4)) )
evaluateDEA(dea, truth)

pipeComp documentation built on Nov. 8, 2020, 7:35 p.m.