Tutorials › Multi-Omics Data Integration › Crossed, Nested, and Partially Crossed Batch Structures

Batch Effects and Confounding Across Cohorts · Tutorial 99 of 597

Crossed, Nested, and Partially Crossed Batch Structures

Learn to classify batch-factor relationships from the sample allocation and determine which within-factor comparisons the design can support.

Advanced 10 min read

What You'll Learn

  • Distinguish crossed, nested, and partially crossed factors using observed factor combinations.
  • Use an incidence graph to diagnose shared levels and disconnected components.
  • Identify comparisons available within sites, platforms, runs, and cohorts.
  • Interpret additive contrasts without mistaking them for evidence of a causal effect.
  • Recognize how missing cells, interactions, and confounding limit batch comparisons.

Why the Batch Structure Matters

A batch label is not enough to tell whether its effect can be separated from other sources of variation. The crucial information is which combinations of factor levels actually occur in the samples. For example, a platform used at every site creates different comparison opportunities from a platform used at only one site. Likewise, processing runs that are unique to each site do not directly link samples across sites.

This tutorial focuses on the structure of the design, not on choosing a particular batch-adjustment procedure. The same labels can support some comparisons but not others. Classifying the structure before adjustment helps prevent a numerical method from being asked to estimate a contrast that the data cannot identify.

Definition: Two factors are crossed when their levels occur in combinations that allow comparisons across levels of both factors. They are fully crossed when every level of one factor occurs with every level of the other. A factor is nested within another when each of its levels occurs in only one level of the other factor. Factors are partially crossed when some combinations are absent but the observed combinations still link levels of the factors, so at least some comparisons across the factors remain possible.

For instance, “platform” and “site” are fully crossed if every platform is used at every site. “Run” is nested within “site” if each run belongs to a single site and run labels identify different runs at different sites. Partial crossing is not the same as nesting: in a partially crossed design, at least some levels are shared across combinations, even though the grid is incomplete.

The word crossed describes the allocation pattern, not whether the factors are statistically independent or whether their effects are equal. Nor does crossing alone guarantee that a biological contrast is estimable: the biological groups of interest must also be represented in a way that separates them from the batch factors.

Reading the Incidence Pattern

A practical first step is to make a table whose rows and columns are factor levels and whose entries give the number of samples in each combination. A positive entry is an observed combination; zero means that cell is absent. The same pattern can be represented as a bipartite graph: one set of nodes represents the levels of factor A, another represents levels of factor B, and an edge joins two levels when at least one sample has that combination.

In this graph, complete crossing means every possible A node is linked to every B node. A nested factor has each of its nodes linked to just one parent node. Partial crossing has some missing edges, but shared nodes can still connect multiple levels. If the graph breaks into disconnected components, there is no observed path linking levels across components.

Key result: In an additive model with one effect for each factor, a connected incidence graph allows the relative level effects to be compared, subject to the model assumptions and any other covariates in the design. A disconnected graph does not support comparisons of factor effects across its components. Connectivity is a structural check; it does not by itself ensure adequate precision or identify every biological contrast.

The justification follows from the additive mean model. For an observation in cell \((a,b)\), write its expected value as \(\mu+\alpha_a+\gamma_b\), where \(\alpha_a\) and \(\gamma_b\) are the effects of the two factor levels. Adding a constant \(c\) to all \(\alpha_a\) values and subtracting \(c\) from all \(\gamma_b\) values leaves every fitted cell mean unchanged. This is a harmless location ambiguity and is resolved by a reference level or a sum-to-zero constraint.

If the graph has two disconnected components, there is a further ambiguity. Add \(c\) to the A effects in one component and subtract \(c\) from the B effects in that component. Every observed cell mean remains unchanged, because every observed edge lies wholly within one component. Yet comparisons of A effects across components change. The data therefore cannot determine those cross-component comparisons under the additive model. This is the graph version of the rank and connectivity checks from the earlier material on design identifiability.

$$ E(Y_{ab})=\mu+\alpha_a+\gamma_b $$

This result assumes an additive model for the factor effects, a common response scale, and observations that provide information in the cells used for a comparison. If an A-by-B interaction is important, the effect of A can differ across levels of B, and a single additive contrast may not describe the data. A connected graph does not supply information for an unobserved cell or prove that an interaction is absent.

Worked Design Examples

Worked Example: Platform and Site Are Fully Crossed

Suppose a hypothetical study measures one omics feature on two platforms, P1 and P2, at two sites, S1 and S2. Each platform-site cell contains three samples, and both biological groups of interest are represented in each cell. The observed sample means, in normalized abundance units, are:

SitePlatform P1 meanPlatform P2 mean
S110 units12 units
S214 units16 units

Every platform occurs at every site, so platform and site are fully crossed. Compare platforms within each site:

At S1, the P2-minus-P1 difference is \(12-10=2\) units. At S2, it is \(16-14=2\) units. The equally weighted average of these within-site differences is \((2+2)/2=2\) units. Thus the observed platform contrast is 2 normalized abundance units at both sites.

The design supports a platform comparison within each site, and a site comparison within each platform. The matching within-site contrasts avoid attributing the different site means (10 versus 14 for P1, for example) to platform. The equal differences are consistent with an additive platform shift in these summaries, but do not prove that the shift is identical in the population. The balanced cell counts and representation of both biological groups make the stated comparisons structurally available; uncertainty and model diagnostics would still be needed for inferential conclusions.

Worked Example: Processing Runs Nested Within Site

In a second hypothetical study, site S1 uses runs R1 and R2, while site S2 uses different runs R3 and R4. Each run has two samples. The observed means for a feature are:

SiteRunMean abundance
S1R110 units
S1R212 units
S2R320 units
S2R424 units

Each run belongs to exactly one site, so run is nested within site. Within S1, the observed R2-minus-R1 difference is \(12-10=2\) units. Within S2, the R4-minus-R3 difference is \(24-20=4\) units. These are comparisons among runs within their respective sites.

A comparison such as “R1 versus R3” is not a comparison of a shared run level: the run labels refer to separate processing events. Also, if all samples from a biological cohort were collected at S1 and a different cohort at S2, the observed site difference cannot, from this allocation alone, separate a cohort difference from a site difference. The run-within-site structure does not create a bridge between those cohorts. This example assumes each run contains samples suitable for its within-site summary; it does not assume that the displayed differences are statistically significant.

Worked Example: A Partially Crossed Cohort-Platform Design

Consider three hypothetical cohorts, A, B, and C, assayed on platforms P1 and P2. A and B are represented on both platforms, while C is represented only on P2. Each observed cell contains two samples, with the following feature means:

CohortP1 meanP2 mean
A8 units10 units
B12 units14 units
CNot observed16 units

The pattern is partially crossed: not every cohort-platform combination is observed, but A and B link the platforms, and P2 links all three cohorts. The cohort contrast B-minus-A can be checked on both platforms: \(12-8=4\) units on P1 and \(14-10=4\) units on P2. The platform contrast P2-minus-P1 is \((10-8)=2\) units in A and \((14-12)=2\) units in B. Under an additive model, its average across these two represented cohorts is \((2+2)/2=2\) units.

C-minus-A is directly available within P2: \(16-10=6\) units. A contrast for cohort C on P1 is not directly observed because that cell is empty. The additive model can express a model-based comparison using the connected pattern, but it cannot supply an observed C-P1 mean or check whether the C-versus-A difference would be the same on P1. The data support comparisons through shared levels; they do not turn missing combinations into measured ones.

Diagnostics, Alternatives, and Limits

Before adjustment, list the levels of every relevant factor and tabulate their observed combinations. Then inspect both the empty cells and the links among levels. The earlier material on rank and connectivity gives the corresponding design-matrix perspective; the incidence graph makes the source of a missing comparison easier to see.

  • Check factor labels. Confirm whether run identifiers are truly shared across sites or merely reused labels. Incorrectly treating local run names as global levels can invent comparisons.
  • Check the biological allocation too. A platform may be crossed with site but perfectly confounded with disease group. Batch-factor crossing does not resolve confounding with an unexamined biological variable.
  • Look for empty cells and disconnected components. A zero cell can limit a particular within-level comparison; a disconnected component prevents cross-component comparisons under an additive model.
  • Check for heterogeneity. Large differences among within-site platform contrasts may indicate interaction, instability, or sampling noise. A single average contrast can conceal this variation.
  • Check replication and precision. An observed edge based on one sample technically links levels, but provides little protection against outliers and may yield highly uncertain estimates.

A complete factorial design is the clearest alternative when planning is possible: it observes every combination and facilitates comparisons across factors. A connected partial crossing can be more economical and still support selected comparisons, but conclusions rely more heavily on which cells exist and on assumptions such as additivity. A nested design is appropriate when lower-level units genuinely belong to only one higher-level unit; it supports within-parent comparisons, not direct comparisons of a shared lower-level effect across parents.

These structures do not prescribe a fixed-effect or random-effect treatment; that is a separate modeling decision. Nor does connectivity establish that a batch correction is scientifically appropriate. The target biological contrast, the feature scale, and the possibility of interactions remain relevant. If biology and batch are inseparable in the observed allocation, software cannot recover the missing comparison merely by applying an adjustment.

Common pitfall: “The table is incomplete, so the batch factors must be nested.” This is wrong: an incomplete table can still be partially crossed if shared levels connect the factors. Classify the design from the observed combinations and their links, not from the number of empty cells alone.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. Platform P1 is used at sites S1 and S2, while P2 is used only at S2. Are platform and site fully crossed, partially crossed, nested, or disconnected?
  2. Each site has two unique processing runs, and no run occurs at more than one site. What is the relationship between run and site, and which run comparisons are directly supported?
  3. In a cohort-platform design, A is observed on P1 and P2, B only on P2, and C only on P3. Is the incidence graph connected? What cross-cohort comparison is not supported by the graph?
  4. A partially crossed design gives platform differences of 1 unit in one cohort and 7 units in another. Why should a pooled additive platform contrast be interpreted cautiously?

Solutions. (1) The design is partially crossed: S2 links P1 and P2, but the S1-P2 cell is absent, so crossing is incomplete. (2) Run is nested within site; comparisons between the two runs within a site are supported, but a run-level comparison across sites is not a comparison of shared run levels. (3) The graph is disconnected: A and B connect through P2, while C is linked only to P3. A comparison of C with A or B is not supported across components under the additive model. (4) The differing contrasts suggest possible cohort-by-platform interaction or sampling variability. A single pooled contrast may hide that heterogeneity and should not be treated as a common platform shift without further justification.

Clinical Biostats