R/ratio.zScore.R

Defines functions ratio.zScore

ratio.zScore <- function(A, B, background=1){
    stopifnot(length(A)==length(B))
    r <- log2(A+background) - log2(B+background)
    ## check distribution?
    ## normal distribution
    pop_sd <- sd(r) * sqrt((length(r)-1)/length(r))
    pop_mean <- mean(r)
    z <- (r - pop_mean)/pop_sd
    z
}

Try the ChIPpeakAnno package in your browser

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

ChIPpeakAnno documentation built on April 1, 2021, 6:01 p.m.