R/p2q.R

Defines functions p2q

p2q <-
function(pvalue,BH=TRUE){
  pvalue[is.na(pvalue)] <- 1
  if (BH) {
    qval.out <- ( length(pvalue) * pvalue ) / rank(pvalue)
    qval.out[qval.out>1] <- 1
    }
  if (!BH) qval.out <- qvalue(pvalue)$qvalue
  return(qval.out)
}

Try the CancerMutationAnalysis package in your browser

Any scripts or data that you put into this service are public.

CancerMutationAnalysis documentation built on Nov. 8, 2020, 6:47 p.m.