Tutorials › Multi-Omics Data Integration › Integrating Host and Pathogen Omics During Infection

Case Studies · Tutorial 594 of 597

Integrating Host and Pathogen Omics During Infection

Use paired host and pathogen measurements to estimate stage-adjusted associations, assess whether those associations vary by disease stage, and diagnose common failures.

Advanced 11 min read

What You'll Learn

  • Define the paired sample and choose appropriate host and pathogen feature scales.
  • Estimate a host–pathogen association conditional on disease stage.
  • Distinguish pooled, stage-adjusted, and stage-specific associations.
  • Interpret coefficients, standard errors, tests, and intervals in measurement units.
  • Diagnose stage imbalance, nonlinear patterns, influential samples, and pairing errors.
  • Explain why an adjusted association does not by itself establish a causal effect.

Why Host and Pathogen Measurements Must Be Read Together

An infection specimen can provide both a measurement of the pathogen and measurements of the host response. A useful question is whether variation in a pathogen feature is associated with variation in a host molecular feature among samples at comparable disease stages. The qualification matters: if pathogen abundance and host expression both change from early to late disease, their overall association may mainly reflect that shared stage pattern rather than a relationship within either stage.

The unit of analysis is ordinarily the biological specimen, with the host and pathogen measurements from the same specimen kept together. If there is one specimen per participant, each participant contributes one paired row. If there are multiple specimens per participant, those rows are not independent; the analysis must account for repeated measurements rather than treating them as separate people.

Definition: Let \(X_i\) be a measured pathogen feature and \(Y_i\) a host molecular feature for specimen \(i\), with both measured from the same specimen. Let \(S_i\) denote its disease stage. A stage-adjusted association describes the relationship between \(X_i\) and \(Y_i\) after allowing the mean of \(Y_i\) to differ by stage. It is a conditional association, not necessarily a causal effect.

For example, \(X_i\) might be log-transformed pathogen abundance and \(Y_i\) log-expression of a host transcript. The slope then has units of host log-expression units per one unit of log pathogen abundance. The scale and transformation must be stated: a one-unit change on a log scale does not mean a one-unit change in raw abundance.

A Stage-Adjusted Association

For two disease stages, code \(S_i=0\) for early stage and \(S_i=1\) for late stage. A basic linear model is

$$ Y_i=\beta_0+\beta_X X_i+\beta_S S_i+\varepsilon_i. $$

Here, \(\beta_X\) is the expected difference in the host feature for a one-unit difference in the pathogen feature, comparing specimens at the same disease stage. The stage coefficient \(\beta_S\) allows the average host feature to differ between stages. This model assumes a common pathogen–host slope in both stages; the model does not permit the association to vary by stage.

For more than two stages, stage can be represented by indicator variables, using one stage as the reference. Treating stages as categories avoids assuming that the difference between successive stages is linear. If a scientifically justified stage score is available, a trend model may be useful, but it imposes a different assumption and should not be substituted automatically.

The ordinary least squares estimate of \(\beta_X\) can be understood as a within-stage slope. First subtract each stage’s mean from \(X\) and \(Y\); then divide the sum of the products of those centered measurements by the sum of squared centered \(X\) values:

$$ \hat{\beta}_X = \frac{\sum_g\sum_{i:S_i=g}(X_i-\bar{X}_g)(Y_i-\bar{Y}_g)} {\sum_g\sum_{i:S_i=g}(X_i-\bar{X}_g)^2}. $$

This identity explains the adjustment: differences between stage means do not contribute to the numerator or denominator of the adjusted slope. The estimate is based on the association among specimens within stages. It is estimable only when there is variation in \(X\) within stages; if pathogen values are constant within every stage, the data cannot distinguish a within-stage slope from the stage pattern.

Worked Example: Correcting a Pooled Association for Stage

Consider eight hypothetical specimens, four early and four late. The within-stage means of \(X\) are 5 and 9, and the within-stage means of \(Y\) are 10 and 17. The within-stage sums of squares for \(X\) total 10, and the within-stage cross-product sum for \(X\) and \(Y\) is 6. For instance, within each stage the deviations from the stage means are \(X=(-1.5,-0.5,0.5,1.5)\) and \(Y=(-0.6,-0.6,0,1.2)\); their cross-products sum to \(0.9+0.3+0+1.8=3\) per stage.

The stage-adjusted slope is the within-stage cross-product sum divided by the within-stage \(X\) sum of squares:

$$ \hat{\beta}_X=\frac{6}{10}=0.600. $$

Thus the estimated within-stage association is 0.600 \(Y\)-units per \(X\)-unit. To compare it with the pooled slope, the overall means are \(\bar{X}=7\) and \(\bar{Y}=13.5\). The early-stage mean deviations from these overall means are \((-2,-3.5)\), and the late-stage deviations are \((2,3.5)\). The between-stage cross-product contribution is

$$ 4(-2)(-3.5)+4(2)(3.5)=28+28=56. $$

Both stages contribute: omitting either one would undercount the between-stage association. The pooled cross-product sum is \(6+56=62\). The pooled \(X\) sum of squares is \(10+4(2^2)+4(2^2)=10+16+16=42\). Therefore, the unadjusted pooled slope is \(62/42=1.476\), substantially larger than the stage-adjusted slope of 0.600. In these hypothetical data, the stage means move together, strengthening the pooled association. The pooled slope does not describe the within-stage relationship.

Assumptions and Inference

A stage-adjusted regression estimate is meaningful only if the model and data support it. The key assumptions and conditions are:

  • Correct pairing and measurement. Each \(X_i\) and \(Y_i\) must refer to the same specimen, with feature definitions, transformations, and quality-control rules applied consistently.
  • Independent sampling units. Errors should be independent across the units treated as independent. Multiple specimens from one participant require a method that accounts for within-participant dependence.
  • Appropriate conditional mean. Within each stage, the mean of \(Y\) should be adequately described as linear in \(X\), unless a different functional form is modeled.
  • Common slope for the additive model. The model above assumes that the change in expected \(Y\) per unit \(X\) is the same at every stage.
  • Residual conditions for standard tests and intervals. For the usual small-sample \(t\)-based inference, residuals should be approximately normal with constant variance, conditional on \(X\) and stage. Large samples can make inference less sensitive to moderate departures, but do not fix dependence or a misspecified mean model.
  • Within-stage information and overlap. There must be variation in \(X\) within stages. If the ranges of \(X\) barely overlap, a common slope can rely heavily on extrapolation and be difficult to interpret.

When those conditions are reasonable, the standard error \(SE(\hat{\beta}_X)\) quantifies the sampling uncertainty in the estimated slope. A test of \(H_0:\beta_X=0\) uses \(t=\hat{\beta}_X/SE(\hat{\beta}_X)\), with degrees of freedom determined by the fitted model. A confidence interval reports a range of slope values compatible with the data and model at the stated confidence level. Neither a small p-value nor an interval excluding zero establishes a causal effect.

Worked Example: Interpreting a Stage-Adjusted Slope

Suppose a hypothetical cohort of 40 independent specimens was analyzed with the additive model, and diagnostics supported its linear form and residual assumptions. The estimated slope for pathogen abundance was \(0.40\), with \(SE=0.16\), and the model had \(df=37\) for this coefficient. The estimated slope is in host log-expression units per one unit of pathogen log abundance.

The test statistic for \(H_0:\beta_X=0\) is

$$ t=\frac{0.40}{0.16}=2.50. $$

For a two-sided test with 37 degrees of freedom, the p-value is approximately 0.017. At significance level \(\alpha=0.05\), the data provide evidence of a nonzero stage-adjusted linear association under the model. The p-value is not the probability that the null hypothesis is true.

Using \(t_{0.975,37}\approx2.026\), an approximate 95% confidence interval is

$$ 0.40\pm2.026(0.16)=0.40\pm0.324=(0.076,0.724). $$

Under the model, the interval estimates an increase of 0.076 to 0.724 host log-expression units per one-unit increase in pathogen log abundance, comparing specimens at the same disease stage. The interval describes uncertainty in the slope, not a 95% probability that the fixed slope lies in this particular interval.

When the Association May Differ by Stage

The common-slope assumption should not be imposed blindly. If biological reasoning or diagnostics suggest that the host response to pathogen variation changes with disease stage, include an interaction:

$$ Y_i=\beta_0+\beta_X X_i+\beta_S S_i+\beta_{XS}X_iS_i+\varepsilon_i. $$

With early stage coded 0, its slope is \(\beta_X\). The late-stage slope is \(\beta_X+\beta_{XS}\), and \(\beta_{XS}\) estimates the difference between the stage-specific slopes. The interaction is tested by \(H_0:\beta_{XS}=0\). If there are several stages, the model needs the corresponding interaction terms to represent stage-specific slopes.

Worked Example: Interpreting a Stage-by-Pathogen Interaction

In a separate hypothetical cohort, an interaction model fitted to 40 independent specimens gives \(\hat{\beta}_X=0.40\), \(SE(\hat{\beta}_X)=0.16\), \(\hat{\beta}_{XS}=0.50\), and \(SE(\hat{\beta}_{XS})=0.20\). Assume residual diagnostics support the model and the pathogen feature has adequate within-stage variation.

The estimated early-stage slope is \(0.40\) host log-expression units per pathogen log-abundance unit. The estimated late-stage slope is

$$ \hat{\beta}_X+\hat{\beta}_{XS}=0.40+0.50=0.90. $$

The estimated slope difference, late minus early, is \(0.50\). For the interaction test, the statistic is \(t=0.50/0.20=2.50\). There are \(40-4=36\) residual degrees of freedom for the model with an intercept, \(X\), stage, and their interaction; the two-sided p-value is approximately 0.017. This is evidence that the slopes differ by stage under the model. It does not, on its own, show that either stage-specific slope differs significantly from zero; testing either slope requires its standard error, including the covariance between coefficient estimates.

Diagnostics, Alternatives, and Limitations

Inspect the measurements and the fitted relationship before interpreting a coefficient. A scatterplot of \(Y\) against \(X\), marked by stage, can reveal whether stage means are separated, whether slopes appear different, and whether a linear trend is plausible. Residual-versus-fitted plots can reveal curvature or unequal spread; residual plots by stage can show stage-specific problems. Check for influential specimens, unusual values, and a small number of observations driving the result. Also verify that paired sample identifiers are correct and that pathogen values are not dominated by detection limits or inconsistent zero handling.

The main alternatives answer different questions. A pooled regression ignores stage and estimates an overall association that can be dominated by between-stage differences. Separate regressions estimate stage-specific associations directly, but may be imprecise when some stages have few samples; the interaction model formalizes the comparison of slopes. A common-slope model adjusts for stage when a shared slope is defensible. For repeated samples from participants, a model that accounts for within-participant dependence is needed; treating repeated specimens as independent can make standard errors too small.

Stage adjustment does not automatically control every relevant difference. Batch, treatment, age, pathogen strain, or other covariates may matter if they are associated with both measured features and are justified for the scientific question. Adding many covariates to a small cohort can make estimates unstable. Likewise, a relative pathogen abundance may change because other organisms change, not because the absolute abundance of the target pathogen changes. State what the assay measures and what the model conditions on.

Finally, disease stage may be a confounder for a descriptive association, but whether adjustment is appropriate for a causal question depends on the temporal and causal relationships among infection, stage, pathogen burden, and host response. An adjusted coefficient is not automatically a direct causal effect. Interpret it as a conditional association unless the study design and causal assumptions justify a stronger claim.

Common Mistakes

  • Using a pooled correlation as though stage were irrelevant. The wrong reasoning is that a strong overall association must occur within stages. The correction is to compare pooled and stage-adjusted estimates and assess whether the stage means drive their difference.
  • Pairing rows by order rather than specimen identity. This can create a meaningless cross-layer association. Match host and pathogen measurements using verified sample identifiers.
  • Calling adjustment a causal correction. Controlling for stage does not eliminate unmeasured confounding, measurement error, or bias from conditioning on an inappropriate variable. Describe the result as conditional association unless a causal argument is supplied.
  • Assuming stage-specific slopes without testing or justification. A common-slope model can conceal effect modification. Examine the interaction when scientifically plausible, while recognizing that small samples may leave it imprecisely estimated.
Key takeaway: Keep host and pathogen measurements paired by specimen, model disease stage explicitly, and report whether the estimated association is pooled, common-slope adjusted, or stage-specific. The interpretation depends on the model, measurement scales, and assumptions.

Check Your Understanding

Answer each question, then compare with the brief solutions.

  1. Why can a pooled pathogen–host slope be larger than the within-stage slope?
  2. In the additive model, what does \(\beta_X\) mean, and what assumption does it make about stages?
  3. If the estimated early-stage slope is 0.3 and the interaction estimate is \(-0.2\), what is the late-stage slope?
  4. Name two checks that could reveal a problem with the analysis before interpreting its p-value.
  5. Does a significant stage-adjusted association establish that pathogen abundance causes the host response? Why or why not?

Solutions. (1) Stage means may differ in both features and add a between-stage component to the pooled association, as in the worked calculation. (2) It is the expected change in \(Y\) per unit increase in \(X\) comparing specimens at the same stage; it assumes a common slope across stages. (3) \(0.3+(-0.2)=0.1\) host units per pathogen unit. (4) Examples include checking specimen-ID pairing, plotting the relationship by stage, examining residuals for curvature or unequal spread, and checking for influential samples or inadequate within-stage variation. (5) No. The result is a conditional association; causality requires additional design and assumptions about confounding, measurement, and temporal relationships.

Clinical Biostats