R/hknorm.R

#' A normalization function
#'
#' This function allows you to calculate normalized OTU table.
#' @param OTU_table pool for OTUs which will be tested for differential abundance in form of OTUs x Samples
#' @param size_factor size factors of all samples for normalization use
#' @keywords housekeeping OTUs
#' @keywords size factor
#' @keywords normalization
#' @export
#' @examples
hknorm <- function(OTU_table, size_factor){
  # input:
  # OTU_table: for later on different abundance testing
  # size_factor: normalization size factor for each sample
  # output:
  # normalized OTU_table
  norm_table = t(t(OTU_table)/size_factor) # OTUs x samples
  return(norm_table)
}
yuanjing-ma/normtestpackage documentation built on May 7, 2019, 2:33 p.m.