eBayes_auto_proportion: Variant of 'limma::eBayes()' that sets the 'proportion'...

View source: R/limma_utils.R

eBayes_auto_proportionR Documentation

Variant of limma::eBayes() that sets the proportion argument automatically.

Description

Limma's limma::eBayes() function can calculate log-odds scores (a.k.a. B statistics), which depend on an estimated proportion of differentially expressed genes that the user specifies a priori. Limma also provides methods for calculating this proportion via limma::propTrueNull(), and other packages also provide similar functions. This function combines the two in order to set the proportion automatically.

Usage

eBayes_auto_proportion(..., prop.method = "lfdr")

Arguments

...

All other arguments are passed to limma::eBayes().

prop.method

The method by which to calculate the proportion of true null hypotheses (i.e. non-differentially expressed genes). This can be a string to be used as the method argument to limma::propTrueNull(), or a function that accepts a vector of p-values and returns a single value between 0 and 1. This argument can only be passed by name.

Details

The B statistics produced when running limma::topTable() on the value returned by this function should be directly interpretable as estimated log odds, as long as the distribituion of p-values is well-behaved.

Note that if the p-value distribution is highly atypical, a proportion that is not between 0 and 1 could be estimated. If this happens, and error will be thrown.

Value

See limma::eBayes().

Examples


#TODO Steal from eBayes


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