OpenMS
Loading...
Searching...
No Matches
MultipleTesting.h File Reference
#include <algorithm>
#include <cmath>
#include <limits>
#include <numeric>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <vector>
#include <OpenMS/config.h>
#include <OpenMS/CONCEPT/Types.h>
#include <OpenMS/MATH/STATISTICS/RankData.h>
Include dependency graph for MultipleTesting.h:

Go to the source code of this file.

Classes

struct  Pi0Result
 Result of pi0 estimation for multiple testing correction. More...
 
struct  MultipleTesting
 Statistical functions for multiple testing correction. More...
 

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::Math
 Math namespace.
 

Functions

std::vector< double > qValue (const std::vector< double > &p_values, double pi0, bool pfdr=false)
 Backward-compatible wrapper for MultipleTesting::qValue.
 
Pi0Result pi0Est (const std::vector< double > &p_values, const std::vector< double > &lambda_=std::vector< double >(), const std::string &pi0_method="smoother", int smooth_df=3, bool smooth_log_pi0=false)
 Backward-compatible wrapper for MultipleTesting::pi0Est (string-based API)
 
std::vector< double > lfdr (const std::vector< double > &p_values, double pi0, bool trunc=true, bool monotone=true, const std::string &transf="probit", double adj=1.5, double eps=1e-8, std::size_t gridsize=512, double cut=3.0)
 Backward-compatible wrapper for MultipleTesting::lfdr (string-based API)
 
std::vector< double > pNorm (const std::vector< double > &stat, const std::vector< double > &stat0)
 Backward-compatible wrapper for MultipleTesting::pNorm.
 
template<class T >
std::vector< double > computeModelFDR (const std::vector< T > &data_in)
 Backward-compatible wrapper for MultipleTesting::computeModelFDR.
 
template<class T >
std::vector< double > pEmp (const std::vector< T > &stat, const std::vector< T > &stat0)
 Backward-compatible wrapper for MultipleTesting::pEmp.
 

Class Documentation

◆ OpenMS::Math::Pi0Result

struct OpenMS::Math::Pi0Result

Result of pi0 estimation for multiple testing correction.

This structure contains the estimated proportion of true null hypotheses (pi0), which is a key parameter in FDR estimation. The pi0 value represents the proportion of hypotheses that are truly null (i.e., no real effect) among all tested hypotheses.

The estimation uses the method described in: Storey JD and Tibshirani R. (2003) "Statistical significance for genome-wide experiments." PNAS 100: 9440-9445. doi: 10.1073/pnas.1530509100

Fields:

  • pi0 : Estimated proportion of true null hypotheses (range: 0-1). A value of 1.0 means all hypotheses are assumed null (most conservative).
  • pi0_lambda : Vector of pi0 estimates at each lambda threshold value. Used for diagnostic purposes and smoothing.
  • lambda_ : Vector of lambda threshold values used for estimation. Typically ranges from 0 to 0.95 in steps.
  • pi0_smooth : Boolean indicating whether smoothing (via spline fitting) was successfully applied. If false, the minimum pi0 value is used as a conservative fallback.
See also
pi0est() for the estimation procedure
Collaboration diagram for Pi0Result:
[legend]
Class Members
vector< double > lambda_
double pi0 = 1.0
vector< double > pi0_lambda
bool pi0_smooth = false