Tutorials › Multi-Omics Data Integration › Building an Overlap Graph From Shared Subjects

Missing Modalities and Partially Observed Subjects · Tutorial 64 of 597

Building an Overlap Graph From Shared Subjects

You will build and interpret an overlap graph, calculate its edge weights from an availability matrix, and distinguish observed overlap from evidence of a valid or sufficiently precise comparison.

Advanced 10 min read

What You'll Learn

  • Define modalities as graph nodes and shared-subject counts as edge weights.
  • Compute all pairwise overlap counts from a subject-by-modality indicator matrix.
  • Interpret an absent edge and disconnected graph without overclaiming.
  • Compare raw edge counts with normalized overlap summaries.
  • Diagnose errors caused by inconsistent subject identifiers or misleading graph thresholds.
  • Explain why overlap supports comparison but does not establish its validity or precision.

Why Represent Modality Overlap as a Graph?

Multi-omics data may contain several modalities measured on partially overlapping sets of subjects. A modality pair can be compared using subjects for whom both measurements are available. Before fitting any cross-modality model, it is useful to know which pairs have shared subjects, how many they have, and whether the pattern connects all modalities. An overlap graph makes those relationships visible.

The graph is a descriptive summary of the observed data structure. An edge records that at least one subject has both modalities; its weight records how many subjects do. The graph does not tell us why measurements are absent, whether the shared subjects represent a target population, or whether a particular analysis is statistically adequate. Those questions require evidence and assumptions beyond the edge counts.

Definition: An overlap graph is an undirected weighted graph whose nodes are modalities. For two distinct modalities \(j\) and \(k\), the edge weight \(w_{jk}\) is the number of subjects with both modalities observed. There is an edge exactly when \(w_{jk}>0\); no self-edges are included. The graph is connected if every pair of nodes can be joined by a path of edges, and disconnected otherwise.

From an Availability Matrix to Edge Weights

Let there be \(n\) subjects and \(m\) modalities. Define \(R_{ij}=1\) if modality \(j\) is observed for subject \(i\), and \(R_{ij}=0\) otherwise. Thus, each row describes one subject's availability pattern and each column describes the availability of one modality. This indicator representation is the starting point for the pairwise calculations.

$$ w_{jk}=\sum_{i=1}^{n}R_{ij}R_{ik},\qquad j\ne k. $$

For a given subject, the product \(R_{ij}R_{ik}\) is 1 only when both indicators are 1. It is 0 if either modality is unavailable. Summing these products therefore counts subjects observed in both modalities. The definition is symmetric: \(w_{jk}=w_{kj}\), so the graph is undirected. The diagonal quantities \(\sum_i R_{ij}\) give the number of subjects observed in each modality, but are node totals rather than edge weights.

This construction assumes that subject identities have been reconciled across data blocks, that each subject contributes at most one availability indicator per modality, and that an indicator of 1 means the measurement is usable for the intended comparison. If repeated samples, multiple visits, or several assays per person are present, the unit being counted must first be specified; otherwise a count can unintentionally represent samples rather than subjects.

Worked Example: Calculating All Pairwise Counts

Suppose a hypothetical study has three modalities, A, B, and C. Its six subjects have these availability patterns: two subjects have A, B, and C; one has A and B only; one has A and C only; one has B and C only; and one has A only. Calculate the graph's edge weights.

For A and B, the two subjects with all three modalities and the one with A and B only are shared: \(w_{AB}=2+1=3\). For A and C, the two subjects with all three modalities and the one with A and C only are shared: \(w_{AC}=2+1=3\). For B and C, the two subjects with all three modalities and the one with B and C only are shared: \(w_{BC}=2+1=3\).

The graph has three nodes and all three possible edges, each with weight 3. The modality totals are A: \(2+1+1+1=5\), B: \(2+1+1=4\), and C: \(2+1+1=4\). These totals are consistent with the patterns, but they are not the pairwise edge counts: for example, A is present in five subjects while only three subjects have both A and B.

What Connectivity and Edge Size Mean

A positive edge count establishes that at least some subjects have both modalities observed. A zero count establishes that no subject in the represented data has both. If the graph is disconnected, then there is no chain of observed shared-subject links connecting every modality. This is an important structural limitation: shared subjects alone cannot provide a path linking the separate components.

Connectivity is weaker than a guarantee that all desired comparisons can be made reliably. A path may connect two modalities indirectly even when they share no subjects directly. For instance, A may overlap with B and B with C, while A and C have no shared subjects. The graph records the possible links in the observed design; it does not prove that an indirect comparison is valid, identify a suitable statistical model, or establish that there are enough observations for adequate precision.

Likewise, a large edge weight is a count, not a measure of effect size or statistical significance. It does not show whether the shared subjects cover relevant covariate groups, whether measurements are comparable across technical batches, or whether the overlap is informative for a particular scientific question. Such assessments require looking beyond the graph.

Worked Example: Finding Disconnected Components

Consider a hypothetical four-modality data set. Three subjects have A and B observed, and two different subjects have C and D observed. No subject has any modality from the first pair together with a modality from the second pair. What does the overlap graph show?

The only positive pair counts are \(w_{AB}=3\) and \(w_{CD}=2\). The four cross-pair counts are \(w_{AC}=0\), \(w_{AD}=0\), \(w_{BC}=0\), and \(w_{BD}=0\). Thus, the graph has two connected components: A–B and C–D.

There is direct shared-subject support for comparing A with B and C with D. There is no observed shared-subject edge, or path, linking the two components. It would be incorrect to claim that the data's overlap structure itself links all four modalities. A method that produces a joint result across the components would need support from additional information or assumptions; the graph alone does not supply that support.

Raw Counts and Relative Overlap

Raw counts are the primary edge weights because they answer a concrete question: how many subjects have both modalities? They can, however, look small when the modalities are observed for very different numbers of subjects. A relative summary can add context, as long as it is reported alongside the count and its denominator is clearly defined.

One option is the Jaccard overlap, the number observed in both modalities divided by the number observed in at least one of them. If \(n_j=\sum_i R_{ij}\) and \(n_k=\sum_i R_{ik}\), then the union count is \(n_j+n_k-w_{jk}\), and the Jaccard overlap is \(w_{jk}/(n_j+n_k-w_{jk})\). This proportion ranges from 0 to 1 when the union is nonempty. It describes relative overlap, not precision or representativeness.

Worked Example: Putting an Edge Count in Context

In a hypothetical five-subject data set, the availability rows for modalities A and B are \((1,1)\), \((1,1)\), \((1,0)\), \((0,1)\), and \((0,1)\). Compute their shared-subject count and Jaccard overlap.

Both modalities are observed for subjects 1 and 2, so \(w_{AB}=1+1+0+0+0=2\). Modality A is observed for three subjects and B for four, so their union contains \(3+4-2=5\) subjects. Therefore, the Jaccard overlap is \(2/5=0.400\), or 40.0%.

The count says that two subjects have both measurements; the proportion says that two of the five subjects observed in at least one of the modalities have both. Neither summary by itself establishes whether two shared subjects are enough for a particular analysis.

Construction, Diagnostics, and Alternatives

A reliable graph begins with an explicit subject-by-modality availability table. Compute each distinct pair once, check symmetry, and verify that each count lies between zero and the smaller of the two modality totals. The following workflow makes common errors easier to catch.

1
Define the unit and align subjects.
Decide whether rows represent people, samples, or visits, then use consistent identifiers across modalities. Resolve duplicate or unmatched records before counting.
2
Construct indicators.
For each subject and modality, record 1 for an observed, usable measurement and 0 otherwise. Do not treat a missing value as observed merely because a row or assay file exists.
3
Calculate pair counts.
For every distinct modality pair, sum the products of the two indicator columns. Record zero counts as absent edges if using a graph display.
4
Check and interpret.
Confirm symmetry and the bounds on each count, then inspect components and small weights. State clearly whether a display uses raw counts or a threshold.

Several checks can reveal a faulty construction. A count greater than the number of subjects observed for either modality is impossible. An asymmetric pair count usually signals a coding or indexing error. A modality with a positive total but no edges is observed, but never alongside another modality. Conversely, if every pair has zero overlap, check subject matching and indicator coding before concluding that the data truly have no shared subjects.

The simplest alternative is a pairwise overlap table containing \(w_{jk}\) for every pair. It preserves exact counts and is often clearer when there are few modalities. A weighted graph is useful for seeing patterns and disconnected components; a binary graph that replaces every positive count by an edge of equal appearance highlights connectivity but conceals differences in support size. Thresholding edges can make a drawing easier to read, but the threshold is a display choice, not a universal statistical rule. Report the underlying counts so that small positive edges are not mistaken for no overlap.

An availability-pattern summary answers a different question: how many subjects have each complete pattern of observed modalities. It can expose patterns that pairwise counts hide. For example, the same pairwise edges could be generated by subjects measured in many modalities together or by separate subject groups for different pairs. The graph is compact, but it does not retain all information in the pattern table.

Common Pitfalls and Limitations

  • Reading an edge as evidence of association. An edge means shared observation, not that the measured values are correlated or causally related.
  • Reading connectivity as sufficient support. A path through several edges does not create direct shared subjects for every pair or guarantee a defensible indirect comparison.
  • Comparing counts without denominators. A count of 10 can represent a small or large fraction of modality availability. Report modality totals or a stated relative overlap measure when relevant.
  • Ignoring what is being counted. Duplicate samples or visits can inflate counts if the intended unit is the subject. State the unit and handle repeated records consistently.
  • Inferring the reason for absence from the graph. The graph records which measurements are available, not why they are unavailable. It cannot distinguish explanations for missingness on its own.

The graph is best used as a design diagnostic and a map of observed support. Small edge counts flag comparisons that may be fragile, while zero edges identify pairs without direct shared-subject data. Neither a small nor a large count automatically determines whether an analysis is appropriate; that judgment depends on the estimand, measurement quality, covariates, and model assumptions.

Key takeaway: For each modality pair, multiply the two subject-level availability indicators and sum over subjects. The resulting edge count describes observed shared-subject support; it does not establish association, adequate precision, or the cause of missing measurements.

Check Your Understanding

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

  1. Four subjects have availability patterns \((1,1,0)\), \((1,0,1)\), \((0,1,1)\), and \((1,1,1)\) for A, B, and C. What are the three edge weights?
  2. If two modalities have availability totals 8 and 6, and their shared-subject count is 4, what is their Jaccard overlap?
  3. What does it mean if a modality node has a positive availability total but no incident edges?
  4. Why does a connected overlap graph not prove that every pairwise comparison has adequate precision?

Solutions. 1. Each pair shares the subject with pattern \((1,1,1)\) and the subject observed in that pair only, so \(w_{AB}=2\), \(w_{AC}=2\), and \(w_{BC}=2\). 2. The union count is \(8+6-4=10\), so Jaccard overlap is \(4/10=0.400\), or 40.0%. 3. The modality is observed for at least one subject, but none of those subjects has any other modality observed; it has no shared-subject comparison in this graph. 4. Connectivity only asserts that paths exist. It does not guarantee large edge counts, adequate measurement quality, representative shared subjects, or that indirect links support the desired comparison.

Clinical Biostats