TMM Scaling Factor
Estimate an unweighted TMM-style scaling factor after trimming extreme log ratios.
Description
A trimmed log-ratio scaling estimate reduces the influence of extreme relative abundances.
A trimmed log-ratio scaling estimate reduces the influence of extreme relative abundances. This implementation is an unweighted TMM-style approximation using only the log-ratio ordering.1
Estimate an unweighted TMM-style scaling factor after trimming extreme log ratios.
When to use TMM Scaling Factor
Use this tool to estimate an unweighted TMM-style scaling factor after trimming extreme log ratios.
Prepare the upstream counts, expression values, sequences or record lists requested by this tool. Keep corresponding features in the same order and confirm count units, transformations and caller-selected criteria.
How to use TMM Scaling Factor and understand its results
- Prepare the upstream counts, expression values, sequences or record lists requested by this tool. Keep corresponding features in the same order and confirm count units, transformations and caller-selected criteria.
- Enter sampleCounts, referenceCounts, sampleLibrarySize, referenceLibrarySize, trimFraction using the field table and calculation rules, then run the tool.
- Read trimmedFeatureCount, meanLogRatio, scalingFactor. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| sampleCounts | Sample counts | list of number | Required |
| referenceCounts | Reference counts | list of number | Required |
| sampleLibrarySize | Sample library size | number | Required |
| referenceLibrarySize | Reference library size | number | Required |
| trimFraction | Trim fraction | number | Required |
Enter aligned nonempty strictly positive feature counts and positive library totals, with trim fraction from zero to below 0.5. Sort M values and remove floor(n×trimFraction) from each end. Return kept count, mean M and scaling factor.
M_i=log2((sampleCount_i/sampleLibrary)/(referenceCount_i/referenceLibrary)); factor=2^mean(trimmed M) Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| trimmedFeatureCount | Trimmed feature count | number |
| meanLogRatio | Mean log ratio | number |
| scalingFactor | Scaling factor | number |
{
"input": {
"sampleCounts": [
100,
200,
300
],
"referenceCounts": [
100,
100,
100
],
"sampleLibrarySize": 600,
"referenceLibrarySize": 300,
"trimFraction": 0.34
},
"output": {
"trimmedFeatureCount": 1,
"meanLogRatio": 0,
"scalingFactor": 1
}
} Limitations and assumptions
It does not trim abundance values, apply inverse-variance weights or reproduce full edgeR TMM normalization. Zero-count features must be excluded upstream; no normalized count matrix is returned.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Lists are limited to 100,000 entries; the rules above may require smaller limits. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Deseq Size Factor: Estimate DESeq-style sample size factors by median ratios to per-gene geometric means. For a complementary task, use Counts Per Million: Convert raw feature counts into counts per million mapped reads.
References
-
TMM Scaling Factor — tool.io
Similar or alternative tools
- Deseq Size Factor
Estimate DESeq-style sample size factors by median ratios to per-gene geometric means.
- Counts Per Million
Convert raw feature counts into counts per million mapped reads.