Back to List

Compositional Data and Log-Ratios

Learn the core concepts and study-design considerations of Compositional Data and Log-Ratios in Python-based biostatistics.

Advanced
|
35min
|
Verified (2026-08-07)
BioStatPybiostatisticsPythonstudy design
Progress0/33 (0%)

Compositional Data and Log-Ratios

Upon Completing This Topic

You will be able to explain how an increase in one component and a decrease in another can be intertwined in ratio-based compositional data where the total sum is constrained. You will recognize the closure problem and verify zeros, measurement units, and denominators before adopting a log-ratio perspective.

Data Observed as Parts of a Whole

Compositional data are expressed as ratios or proportions of multiple parts that constitute a whole. If the sum of feature-specific proportions in a sample is constant, observing an increase in one part may reflect not only an absolute increase in that part but also a relative decrease in other parts.

Aitchison鈥檚 research on compositional data treats the simplex as the sample space, addressing the relationships among parts that constitute the whole from the perspective of ratios and transformations rather than simple correlations in original coordinates. This module introduces only the problem awareness and the log-ratio direction, without presenting specific omics tools as universal prescriptions.

Closure and Denominators

text
sample A: [0.20, 0.30, 0.50]
sample B: [0.10, 0.30, 0.60]

The components of each vector sum to 1. Before comparing only the values of individual parts, verify what the total denominator and measurement process are. Do not interpret library size or sequencing depth simply as an independent biological quantity for each feature.

Log-Ratio Perspective

The relative relationship between part i and part j can be expressed as log(x_i / x_j). Interpretation may change when the reference part in the ratio changes, so record which denominator and transformation were chosen. Transformations such as the centered log-ratio, which compare each part with the overall geometric mean, are also available, but logarithms cannot be calculated directly when zeros are present.

Zeros and Preprocessing

0 may represent true absence, values below the detection limit, measurement failure, or results of filtering. Therefore, do not automatically add a small constant to calculate logs. Preserve zero-handling rules and their rationale, as well as data before and after transformation, separately.

Returning to Research Questions for Interpretation

Log-ratio analysis is a method for expressing the relative relationships of compositions in alignment with research questions. Do not automatically translate these into evidence of absolute quantity increases or biological mechanisms. Interpret them alongside denominators, sampling processes, batches, and replicates.

Common Failures

  • Do not treat data with constrained ratio sums as a collection of independent continuous variables.
  • Do not ignore closure and interpret feature-specific correlations as causes.
  • Do not automatically add small values to zeros.
  • Do not fail to record the denominator and units of log-ratios.

Key Takeaways

  • Compositional data carry constraints of both the whole and its parts.
  • A relative increase in one part is a ratio relationship with other parts.
  • Log-ratios are a perspective for expressing these relative relationships.
  • Verify zeros, denominators, and measurement processes before selecting transformations.

Next Topic

In the next module, we connect to PCA and high-dimensional QC to examine how preprocessing and batches affect low-dimensional representations.

References

The numerical values and compositional data examples in this module were independently authored by BioStatPy.

馃挰 Questions & Comments

0 comments

You can post without signing in. Guest comments cannot be edited or deleted by their author.

0/2000

Loading...