The Trimmed Mean of M-values (TMM) is a normalization algorithm implemented in the edgeR package that calculates sample-specific scaling factors to correct for differences in RNA composition between libraries. Unlike simple total count normalization, TMM assumes that the majority of genes are not differentially expressed and computes a reference sample against which all others are compared. The method first removes genes with extreme M-values (log-fold changes) and A-values (average expression), trimming 30% of the log-ratio data by default, then calculates a weighted mean of the remaining ratios to produce a robust normalization factor.
Glossary
Trimmed Mean of M-values (TMM)

What is Trimmed Mean of M-values (TMM)?
A robust inter-sample normalization method that estimates scale factors by computing a weighted trimmed mean of log expression ratios, excluding highly variable and lowly expressed genes to correct for compositional biases in RNA-seq data.
TMM normalization is particularly effective when a minority of highly expressed genes dominate a library's read count, a phenomenon that skews naive normalization methods like Counts Per Million (CPM). By trimming the upper and lower tails of the expression distribution, TMM prevents outlier genes from distorting the effective library size. The resulting scale factors are then used to adjust raw counts before downstream differential expression analysis with tools such as edgeR or limma-voom, ensuring that observed fold changes reflect genuine biological variation rather than technical artifacts introduced by unequal sequencing depth or transcriptome composition.
Key Features of TMM Normalization
TMM normalization is a robust scaling method that estimates sample-specific factors to correct for compositional biases in RNA-seq libraries, ensuring accurate between-sample comparisons without distorting biological signals.
Weighted Trimmed Mean Calculation
TMM computes a weighted trimmed mean of log-fold-changes (M-values) between a reference sample and each test sample. Genes with extreme M-values (top and bottom 30% by default) and those with low absolute expression (bottom 5%) are trimmed to prevent highly variable or lowly expressed genes from dominating the normalization factor. The remaining genes are weighted inversely to their approximate asymptotic variance, giving more influence to genes with stable, moderate expression. This produces a single scale factor per sample that corrects for differences in RNA composition without assuming equal total mRNA output.
Reference Sample Selection Strategy
TMM requires selecting a reference sample against which all other samples are compared. The default behavior in edgeR selects the sample whose upper quartile of counts is closest to the mean upper quartile across all samples, ensuring the reference is representative of the dataset's central tendency. Alternatively, users can specify a custom reference, such as a control condition. The scale factors are then computed iteratively: each sample's M-values are calculated relative to the reference, trimmed, and weighted to produce a normalization factor that multiplies the library size to yield an effective library size.
Robustness to Outliers and Skew
The trimming and weighting mechanisms make TMM highly robust against outliers that would distort simpler normalization approaches. By excluding the most extreme M-values, TMM prevents a small number of genuinely differentially expressed genes from biasing the global scaling factor. The precision weights downweight genes with high expected variance, further stabilizing the estimate. This robustness is particularly valuable in cancer transcriptomics and other scenarios where large-scale transcriptional reprogramming might violate the assumption that most genes are unchanged, as the trimming threshold can be adjusted to accommodate expected biological perturbation.
Comparison with Alternative Methods
TMM occupies a middle ground between simple library-size normalization and more complex model-based approaches:
- vs. CPM/RPKM: TMM corrects for compositional bias; CPM does not
- vs. Upper Quartile: TMM is more robust because it trims extremes rather than using a single quantile
- vs. DESeq2's Median of Ratios: Both assume a stable majority of genes, but TMM uses weighted trimming while DESeq2 uses the median ratio; performance is often comparable
- vs. Quantile Normalization: TMM preserves the original count scale and variance structure, while quantile normalization forces identical distributions, which can distort biological signals TMM is particularly recommended when library compositions are expected to differ substantially between conditions.
TMM vs. Other RNA-seq Normalization Methods
Comparison of Trimmed Mean of M-values against other common normalization strategies for RNA-seq count data, highlighting assumptions, robustness, and use cases.
| Feature | TMM | RLE (DESeq2) | Upper Quartile | Total Count (CPM) |
|---|---|---|---|---|
Normalization Basis | Weighted trimmed mean of log fold changes | Median ratio of counts to geometric mean | 75th percentile of counts | Total library size |
Assumption | Most genes are not differentially expressed | Most genes are not differentially expressed | Upper quartile is invariant | Total RNA output is equal across samples |
Handles Composition Bias | ||||
Robust to Outlier Genes | ||||
Requires Reference Sample | ||||
Effective Library Size Calculation | Scale factor multiplied by library size | Median ratio multiplied by library size | Upper quartile replaces library size | Raw library size used directly |
Typical False Positive Control | High | High | Moderate | Low |
Recommended For | Between-sample comparisons with asymmetric differential expression | General differential expression with moderate composition bias | Technical replicates with low expression variability | Exploratory analysis only; not for differential testing |
Frequently Asked Questions
Clear, technically precise answers to the most common questions about the Trimmed Mean of M-values normalization method for RNA-seq differential expression analysis.
The Trimmed Mean of M-values (TMM) is a robust scaling normalization method for RNA-seq data that estimates sample-specific scale factors by computing a weighted trimmed mean of log expression ratios (M-values) between each sample and a reference, after excluding genes with extreme fold changes and low expression. Implemented in the edgeR package, TMM operates on the assumption that the majority of genes are not differentially expressed, allowing it to use the 'stable bulk' of the data to correct for differences in RNA composition and sequencing depth. The method trims a percentage of the most extreme M-values (default 30%) and A-values (default 5%) to remove outliers that would distort the normalization factor, making it particularly robust to the presence of highly differentially expressed genes that can skew simpler methods like total count scaling.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
TMM normalization is part of a broader ecosystem of computational methods designed to remove technical artifacts from RNA-seq data. These related concepts are essential for understanding how TMM fits into a robust differential expression workflow.
Normalization (RNA-seq)
The computational process of adjusting raw read counts to remove systematic technical biases. TMM specifically addresses library composition bias, where a few highly expressed genes can skew the effective library size. Other biases include sequencing depth and gene length, each requiring distinct correction strategies.
Counts Per Million (CPM)
A simple normalization unit that scales raw counts by total library size. Unlike TMM, CPM does not account for composition bias. A sample with a few massively overexpressed genes will have deflated CPM values for all other genes. TMM's weighted trimmed mean directly addresses this limitation by down-weighting extreme log-ratios.
MA Plot
A diagnostic visualization plotting the log-ratio (M-value) against the mean average expression (A-value) for all genes. After TMM normalization, a well-normalized dataset should show the cloud of points centered symmetrically around M=0, with no systematic intensity-dependent bias. This is the primary visual check for normalization effectiveness.
Negative Binomial Distribution
The probability distribution underlying the statistical models in edgeR and DESeq2. It accounts for overdispersion—the phenomenon where biological variance exceeds the mean. TMM normalization provides properly scaled counts to these models, ensuring that the mean-variance relationship is accurately estimated for each gene.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us