% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepare_data2fit.R \name{medianRatioNormalization} \alias{medianRatioNormalization} \title{Apply Median Ratio Normalization to a Counts Matrix} \usage{ medianRatioNormalization(countsMatrix) } \arguments{ \item{countsMatrix}{A counts matrix where rows represent genes and columns represent samples.} } \value{ A normalized counts matrix after applying median ratio normalization. } \description{ This function performs median ratio normalization on a counts matrix to adjust for differences in sequencing depth across samples. } \details{ This function calculates the logarithm of the counts matrix, computes the average log expression for each gene, and then scales each sample's counts by the exponential of the difference between its average log expression and the median of those averages. } \examples{ counts <- matrix(c(100, 200, 300, 1000, 1500, 2500), ncol = 2) normalized_counts <- medianRatioNormalization(counts) }