#' Normalized counts for edgeR
#'
#' Normalized counts for edgeR
#'
#' @param dge an \code{DGEList} object
#' @return A matrix of normalized counts
#' @author Marie-Agnes Dillies and Hugo Varet
# created Dec 4th, 2013
# modified April 4th, 2014 (fixed an error: tmm*N/mean(tmm*N) instead of tmm*N/mean(N))
normCounts.edgeR <- function(dge){
tmm <- dge$samples$norm.factors
N <- colSums(dge$counts)
f <- tmm * N/mean(tmm * N)
return(round(scale(dge$counts, center=FALSE, scale=f),digits=0))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.