Pseudocode description of the non-parametric PEP estimation procedure. Given a set T of target PSM scores and a set D of decoy PSM scores, the algorithm returns the estimated PEP associated with the observed target score x. The parameter N specifies the number of bins. The function pi0.bootstrap reimplements the bootstrap π0 estimation procedure (Storey, 2002) from the R-function qvalue. The function irls is described in an on-line appendix.