pvalue2qvalue: Calculate Benjamini-Hochberg q-values

Description Usage Arguments Details Value Note Author(s) Examples

View source: R/ramwas.r

Description

Calculate Benjamini-Hochberg q-values for a vector of p-values.

Usage

1
pvalue2qvalue(pv, n = length(pv))

Arguments

pv

Vector of p-values.

n

If pv has only top p-values from a bigger set, n should indicate the number of tests performed.

Details

The q-values can be slightly conservative compared to other popular q-value calculation methods.

Value

Return a vector of q-values matching p-values in pv.

Note

The function runs faster if the vector pv is sorted.

Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

Examples

1
2
3
pv = runif(20)^2

qv = pvalue2qvalue(pv)

Example output

Loading required package: filematrix
Warning messages:
1: no function found corresponding to methods exports from 'DelayedArray' for: 'acbind', 'arbind' 
2: no function found corresponding to methods exports from 'SummarizedExperiment' for: 'acbind', 'arbind' 
3: replacing previous import 'BiocGenerics::path' by 'Rsamtools::path' when loading 'GenomicAlignments' 
4: multiple methods tables found for 'rglist' 

ramwas documentation built on Nov. 8, 2020, 8:24 p.m.