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

  1. 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.
  2. Enter sampleCounts, referenceCounts, sampleLibrarySize, referenceLibrarySize, trimFraction using the field table and calculation rules, then run the tool.
  3. Read trimmedFeatureCount, meanLogRatio, scalingFactor. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. 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 fieldMeaningValue type; see rules belowRequirement
sampleCountsSample countslist of numberRequired
referenceCountsReference countslist of numberRequired
sampleLibrarySizeSample library sizenumberRequired
referenceLibrarySizeReference library sizenumberRequired
trimFractionTrim fractionnumberRequired

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 fieldMeaningValue type
trimmedFeatureCountTrimmed feature countnumber
meanLogRatioMean log rationumber
scalingFactorScaling factornumber
json
{
  "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

  1. 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies