add_bfdr: Add Bayesian FDR values to a limma top table

View source: R/fdr_utils.R

add_bfdrR Documentation

Add Bayesian FDR values to a limma top table

Description

This function uses bfdr() to compute the posterior probability of differential expression and the FDR based on limma's B-statistics and add them as columns named "PP" and "BFDR" respectively.

Usage

add_bfdr(ttab)

Arguments

ttab

A data frame returned by limma::topTable() with n=Inf containing B-statistics.

Value

The same table with additional columns named "PP" and "BFDR".

Note that limma only produces B-statistics for single-contrast tests (i.e. moderated t-tests). As a convenience, if this fuction is called on a data frame with no column named "B", it will issue a warning and return the data frame unmodified.

See Also

limma::topTable().

Examples


# TODO copy examples from limma::topTable()


DarwinAwardWinner/rctutils documentation built on July 22, 2022, 5:19 a.m.