R/normCounts.edgeR.R

Defines functions normCounts.edgeR

Documented in normCounts.edgeR

#' 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))
}
biomics-pasteur-fr/RNADiff documentation built on Aug. 27, 2020, 12:44 a.m.