Tutorials › Multi-Omics Data Integration › Representing Matched Omics Blocks for Joint Analysis

Multiple Factor Analysis and Joint PCA · Tutorial 154 of 597

Representing Matched Omics Blocks for Joint Analysis

Represent matched omics assays as aligned matrices, and verify that their shared analysis table preserves sample identity, feature blocks, and dimensions.

Advanced 10 min read

What You'll Learn

  • Define each omics block as a subject-by-feature matrix with an explicit sample order.
  • Build a shared table by joining blocks on biological sample identity.
  • Check the dimensions and feature labels of a concatenated analysis matrix.
  • Distinguish matched samples from samples that merely have the same count.
  • Recognize how preprocessing, missingness, and repeated measurements affect matrix construction.
  • Compare joint-table representation with separate-block and two-block analyses.

Why representation comes before joint analysis

A joint analysis of omics data starts with a bookkeeping problem: which row in each assay refers to the same biological sample, and which columns belong to each assay? A row-order error can create apparent cross-assay relationships between measurements from different people. A feature-label error can make a result impossible to trace back to its assay. These are not cosmetic issues; they change the data being analyzed.

The central object here is a collection of matched subject-by-feature matrices. Each block records one assay or feature family on a common set of biological units. The blocks can then be represented side by side in one table while retaining their identities. This tutorial focuses on that representation, not on how a later method weights the blocks or extracts joint components.

Definition: For block \(k\), let \(X^{(k)}\) be an \(n \times p_k\) matrix. Its \(n\) rows represent the same \(n\) matched biological samples, in a specified order, and its \(p_k\) columns represent features measured in assay block \(k\). The shared analysis table is the horizontal concatenation $$ X = [X^{(1)} \; X^{(2)} \; \cdots \; X^{(K)}], $$ with dimension \(n \times \sum_{k=1}^{K} p_k\). The sample order must be identical across blocks, and each column must retain its block and feature identity.

What “matched” means in a matrix

A sample is the biological unit that is intended to be compared across assays: for example, one participant’s blood specimen measured by transcriptomics and proteomics. Matching requires a verified correspondence of identities, not simply equal row counts. If row 4 of one block is participant S104, row 4 of every other block must also be participant S104.

Before forming \(X\), define the unit represented by a row and the rule for matching it. A participant ID may be sufficient when every assay uses that participant’s same specimen. If an assay instead measures a different tissue, time point, or aliquot, the match key may need to include those distinctions. Two samples from the same participant at different visits are not interchangeable rows merely because they share a participant ID.

Each block also needs an explicit feature set. For example, a transcriptomics block might have genes as columns and a metabolomics block might have metabolites as columns. Column names should be unique in the combined table and informative enough to identify both the block and feature. A name such as “feature_17” is ambiguous; a name such as “RNA:GENE17” makes the block membership explicit.

Worked Example: Aligning Two Blocks by Sample ID

Suppose a hypothetical study has three participants, S1, S2, and S3. The transcriptomics file lists them in the order S1, S2, S3, while the protein file lists them in the order S3, S1, S2. Each file measures two features.

The transcriptomics values, already in the intended sample order, are $$ X^{(1)} = \begin{bmatrix} 2 & 5\\ 4 & 3\\ 6 & 7 \end{bmatrix}, $$ where the columns are RNA:GeneA and RNA:GeneB. The protein file, in its original order S3, S1, S2, is $$ \begin{bmatrix} 30 & 9\\ 10 & 5\\ 20 & 7 \end{bmatrix}. $$ Its columns are Protein:P1 and Protein:P2.

To match rows, reorder the protein file to S1, S2, S3. The first row becomes the original second row, the second row becomes the original third row, and the third row becomes the original first row: $$ X^{(2)} = \begin{bmatrix} 10 & 5\\ 20 & 7\\ 30 & 9 \end{bmatrix}. $$ The shared table is then $$ X = \begin{bmatrix} 2 & 5 & 10 & 5\\ 4 & 3 & 20 & 7\\ 6 & 7 & 30 & 9 \end{bmatrix}. $$ It has \(n=3\) rows and \(p_1+p_2=2+2=4\) columns. Its first two columns are RNA features and its last two are protein features. For example, the entry 20 in row 2, column 3 is the P1 measurement for S2. Simply placing the protein file beside the RNA file without reordering would instead pair S1’s RNA values with S3’s protein values in row 1.

Dimensions, labels, and the shared table

With \(K\) blocks, the row dimension is shared, while the column dimension is the sum of block dimensions. The block-specific dimensions \(p_k\) need not be equal. One block may have thousands of features and another only dozens; the representation remains well-defined as long as each block uses the same matched samples.

A useful data dictionary records, for every column, its block, feature identifier, measurement unit, transformation, and any filtering or coding applied. The data table itself should preserve a consistent column order, such as all features from block 1 followed by all features from block 2. The exact order is not a statistical assumption, but documenting it prevents errors when results are mapped back to assay features.

The matrices ordinarily contain numeric measurements suitable for the intended multivariate analysis. Clinical variables such as age or treatment group are not automatically additional omics blocks. They may be retained as sample metadata for later interpretation, but including them as columns changes the analysis question and requires an explicit decision about their coding and role.

Worked Example: Checking Dimensions and Column Membership

Consider a hypothetical matched data set with \(n=5\) samples, a metabolomics block with \(p_1=3\) metabolites, and a methylation block with \(p_2=4\) regions. The blocks are $$ X^{(1)} \in \mathbb{R}^{5 \times 3}, \qquad X^{(2)} \in \mathbb{R}^{5 \times 4}. $$ The shared table has dimension $$ 5 \times (3+4) = 5 \times 7. $$

Suppose the columns are ordered as Metabolite:M1, Metabolite:M2, Metabolite:M3, then Methylation:R1, Methylation:R2, Methylation:R3, Methylation:R4. Row \(i\) must correspond to the same sample in both blocks. If row 3 is sample S203 in the metabolomics matrix, row 3 of the methylation matrix must also be S203.

A reliable dimension check is therefore not merely “both matrices have five rows.” It is: both have five rows, the row IDs are identical in the same order, the columns have the stated counts, and the feature labels agree with the measured assay. If these checks pass, horizontal concatenation produces five sample rows and seven feature columns, with the block boundary after column 3.

Preprocessing belongs to the representation record

The entries in a block may be raw instrument values, normalized measurements, transformed values, or values after feature-level filtering. The matrix must be explicit about which version is being used. For example, a log transformation changes the scale of the entries, while centering a feature changes its reference point. Neither operation changes which sample or feature an entry represents, but both affect the numerical matrix supplied to an analysis.

A common preparation is to center each quantitative feature across the matched samples, so that a column’s sample mean is zero. If the \(j\)th feature in block \(k\) has observed values \(x_{1j}^{(k)}, \ldots, x_{nj}^{(k)}\), its centered entry is $$ x_{ij,\mathrm{centered}}^{(k)} = x_{ij}^{(k)} - \frac{1}{n}\sum_{r=1}^{n}x_{rj}^{(k)}. $$ This formula is applied feature by feature, using the same set of rows for that feature. Centering is not the same as standardizing to unit variance, and the choice of scaling is a separate analytical decision. In particular, a single global scaling rule should not be assumed to make different omics blocks comparable.

For a valid numerical representation, measurements within a column should have a coherent interpretation and the preprocessing should not use sample identities inconsistently. If samples are filtered, reordered, or transformed in one block, the corresponding operation must be reflected in the matched table. Record the sample set used for each transformation, because means and other summaries can change when the included samples change.

Worked Example: Centering One Feature With Explicit Arithmetic

Suppose a hypothetical feature has values \(2, 4, 6\) across matched samples S1, S2, and S3, measured in arbitrary assay units. Its sample mean is $$ \bar{x} = \frac{2+4+6}{3} = \frac{12}{3} = 4. $$ Subtracting that mean from each value gives centered measurements $$ 2-4=-2,\qquad 4-4=0,\qquad 6-4=2. $$ The centered column is \((-2,0,2)^\mathsf{T}\), still associated with S1, S2, and S3 in that order. Its mean is \((-2+0+2)/3=0\). The units remain assay units after centering; the entries now describe deviations from the feature’s mean in this sample set. This calculation illustrates a column operation, not a rule that every block must be scaled identically.

Assumptions and checks before concatenation

The representation is appropriate for joint analysis only under a few basic conditions. First, each row must refer to the same defined biological unit across blocks. Second, each block must have a valid and documented feature-to-column mapping. Third, the measurements must be on a form accepted by the intended analysis, with preprocessing and units recorded. Finally, the handling of unavailable measurements must be explicit.

Use diagnostics that test these conditions directly rather than relying on a successful matrix operation. Check that sample IDs are unique at the chosen matching level, that the ID vectors are identical after alignment, and that dimensions equal the expected values. Inspect the number and pattern of missing entries by block and sample. Check for duplicated feature names, all-constant columns, and nonnumeric values that have been imported as text. These checks do not establish biological validity, but they can expose representation errors before they become analytical results.

Missing values require special care. A blank measurement is not automatically zero: zero can be a real measured value, whereas a blank may mean not assayed, below detection, or a failed measurement. If an analysis requires a complete rectangular matrix, one possible representation is to restrict to samples observed in every included block, but this changes the sample set and may introduce selection bias. Other missing-data strategies require assumptions of their own. The choice should be stated rather than hidden in an automatic software default.

Worked Example: Defining the Matched Sample Set With Missing Data

Suppose a hypothetical RNA block has measurements for S1, S2, S3, and S4, while a protein block has measurements for S1, S2, and S4. The intended joint analysis requires both blocks and a complete row for every included sample. The intersection of the observed sample IDs is S1, S2, and S4, so the complete matched table has \(n=3\) rows, not 4.

After ordering both blocks as S1, S2, S4, the RNA block must also omit its S3 row. The resulting row counts agree and the sample ID vectors match. If S3 were kept with an empty protein entry, the table would not be complete; if the empty entry were silently replaced by zero, that would assert a measured protein value of zero rather than document a missing measurement.

This complete-case construction is justified as a representation only if the stated analysis is intended to use samples observed in both blocks. It does not show that dropping S3 is harmless: if the missing protein measurement is related to sample characteristics or assay values, the retained sample set may differ systematically from the original set. The missingness pattern and the reason for choosing the sample set therefore belong in the analysis record.

Why the block boundary matters

Horizontal concatenation creates one numerical table but does not erase the fact that its columns came from distinct assays. In particular, the matrix product \(X^\mathsf{T}X\) has a block structure. If \(X=[X^{(1)} \; X^{(2)}]\) for two blocks, then $$ X^\mathsf{T}X = \begin{bmatrix} (X^{(1)})^\mathsf{T}X^{(1)} & (X^{(1)})^\mathsf{T}X^{(2)}\\ (X^{(2)})^\mathsf{T}X^{(1)} & (X^{(2)})^\mathsf{T}X^{(2)} \end{bmatrix}. $$ The diagonal parts involve relationships among features within a block; the off-diagonal parts involve cross-products between features from different blocks. This follows by multiplying the horizontally partitioned matrix by its transpose: each column block contributes the corresponding within-block product, and each pair of distinct blocks contributes a cross-product. Thus, column membership and scaling are analytically consequential, even though concatenation itself is just a rearrangement of columns.

This representation differs from analyzing each block separately, where cross-block relationships are not in a common feature table. It also differs from two-block CCA or PLS, which are framed around a pair of matrices and an association objective. Those methods are useful alternatives when the scientific question concerns association between two specified blocks. A shared multi-block table is a general input representation for joint ordination methods, but the act of concatenating alone does not decide how blocks should be weighted or what structure a later method will emphasize.

Common mistakes and limitations

  • Matching by row number. The incorrect reasoning is “both files have 100 rows, so row 25 corresponds.” Equal row counts do not establish identity. Align using verified sample IDs, then check the full ordered ID vectors.
  • Treating a participant as every possible sample unit. If the assays use different visits or tissues, participant ID alone may merge non-equivalent specimens. Define the row unit and matching key to include the relevant visit or specimen.
  • Discarding block labels after concatenation. A generic column number cannot identify an assay feature. Preserve block and feature names so that columns and later results remain traceable.
  • Assuming concatenation makes scales comparable. Placing columns side by side does not remove differences in units, ranges, or preprocessing. Scaling and block weighting are distinct methodological choices.
  • Encoding missingness as zero without justification. Zero and unavailable are different states. Preserve that distinction and state how missing entries are handled.

The basic matrix representation also has limits. It presumes that the chosen sample-level correspondence is scientifically meaningful and that each column can be treated as a feature in the intended analysis. It does not resolve confounding, assay batch effects, different measurement reliability, or the consequences of selecting only complete samples. Nor does it determine how to balance blocks with very different numbers of features. These issues require analysis choices beyond the construction of the shared table.

Key takeaway: A valid shared omics table is more than a side-by-side merge. It has a defined sample unit, verified row alignment, documented feature blocks, explicit preprocessing, and a transparent rule for missing measurements.

Check Your Understanding

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

  1. A transcriptomics matrix has 12 rows and 800 columns; a proteomics matrix has 12 rows and 35 columns. What additional check is required before concatenating them, and what is the resulting dimension if the check passes?
  2. Two assay files list the same five sample IDs, but in different orders. Why is matching only by row position invalid, and what operation fixes the representation?
  3. A column has values \(3, 3, 3, 3\). What is its centered column, and why should it be flagged before a later multivariate analysis?
  4. One block has a missing entry for sample S8. Explain why replacing it with zero is not automatically a valid way to create a complete table.

Solutions. (1) Verify that the row IDs identify the same biological units and are in the same order; equal row counts alone are insufficient. If verified, the concatenated table has \(12 \times (800+35)=12 \times 835\) entries. (2) Row positions pair values from different samples when the orders differ. Reorder one or both matrices by verified sample ID, then confirm the ordered ID vectors agree. (3) The mean is \((3+3+3+3)/4=3\), so centering gives \((0,0,0,0)^\mathsf{T}\). The feature has no variation in these samples and may be unsuitable for methods that require informative variable columns; investigate and handle it according to the analysis plan. (4) Zero would represent a measured value of zero, not an unavailable measurement. Preserve the missing status and choose an explicit strategy, such as a justified sample restriction or a separately specified missing-data method.

Clinical Biostats