R/calcQ.R

Defines functions calcQ

calcQ <- function(Pvalues){

Qvalues <- numeric(length(Pvalues))

for (i in 1:length(Pvalues)) {
            
                threshold <- Pvalues[i]
                significants <- 0
                Qvalues[i]   <- 0
                for (i2 in 1:length(Pvalues))
                {
                    if (Pvalues[i2]>=threshold) {
                        Qvalues[i]  <- Qvalues[i] + (1-Pvalues[i2])
                        significants<-significants + 1
                    }
                }
                Qvalues[i] <- Qvalues[i]/significants
}
return(Qvalues)
}

Try the GeneFeST package in your browser

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

GeneFeST documentation built on May 29, 2017, 7:49 p.m.