Lesson 6 of 9
Module 7 · From genes to function
Why one layer can mislead and two can correct it, using HER2 in breast cancer; then the ways layers are joined: early, intermediate and late, knowledge-based, data-driven and hybrid, pathway-based integration, and the problems every study meets.
One gene, every layer
Module 1 introduced each omics layer on its own: the genome, the epigenome, the transcriptome, the proteome and the metabolome. Multi-omics means measuring two or more of these layers in the same samples and analysing them together. HER2 in breast cancer is the clearest example of one story told across the layers.
A note on names: ERBB2 is the name of the gene, and HER2 the usual name of the protein it makes, a receptor that sits in the cell's outer membrane and passes growth signals inwards. About 15–20% of breast cancers are HER2-positive. Follow the story down the layers below.
Each step follows from the one before. More copies of the gene (a copy-number change, Genomics) mean more RNA, more RNA means more receptor protein, and the excess receptor keeps sending growth signals. Trastuzumab is a monoclonal antibody, a laboratory-made antibody that recognises one target, here HER2. Because the drug acts on the protein, the protein layer is the one most directly tied to treatment.
In practice, HER2 status is decided with a protein stain (IHC) and, when borderline, a DNA test for amplification (ISH). IHC is scored from 0 to 3+ by how strongly and completely the cell membranes stain (Proteomics and metabolomics): 3+ is positive, 0 or 1+ negative, and 2+ borderline. For borderline cases, ISH (in situ hybridisation) applies a labelled piece of DNA that matches ERBB2 to the tissue slice, so the copies of the gene in each nucleus show up as spots that can be counted. Two layers are used because neither is perfect alone.
The HER2 story also shows why this lesson sits where it does in the module. The lessons from Finding genes and annotating a genome to Biological networks and systems biology each took one kind of information as far as it would go: genes in a genome, domains in a protein, a fold in three dimensions, pathways from a gene list, and connections between proteins. HER2 uses several of them at once. The amplified gene is found in the genome, the receptor's kinase domain is what passes the signal on, and trastuzumab works because it binds a part of the receptor's shape outside the cell. Multi-omics is the practice of joining such pieces on purpose, in the same samples.
HER2 testing in breast cancer follows the ASCO/CAP guideline, Wolff et al. 2018, Journal of Clinical Oncology, which sets the IHC and ISH rules described here; a 2023 update kept them. Since then the meaning of a "negative" result has shifted. Modi et al. 2022, New England Journal of Medicine, showed that trastuzumab deruxtecan, an antibody joined to a drug, helps some patients with advanced cancer whose tumours score IHC 1+ or 2+ without amplification, now often called "HER2-low". HER2-low is a treatment category, not a separate biological layer, and it depends on telling IHC 0 from 1+, which is hard to score reliably.
When layers disagree
- A tumour suppressor with no mutation, silenced by methylation. Only the epigenome shows it.
- A mutation in a gene the tissue never expresses. The transcriptome shows it probably does not matter.
- High RNA for a kinase, but little active, phosphorylated protein. Only proteomics shows the pathway is off.
Each case is a gap between two neighbouring layers in the flow of The central dogma, as data. The first is a gap between genome and transcriptome caused by the epigenome, as with MLH1 in Epigenomics. The second is a genome finding with no consequence further along. The third is a gap between RNA and protein activity, as described in Proteomics and metabolomics. In each case, one layer alone would have given the wrong answer, and a second layer corrected it. That is the core argument for multi-omics: layers are not copies of each other. Across many genes, RNA and protein levels in the same samples correlate only moderately, because translation, protein lifetime and modification all intervene.
Each of the three intervening steps can be pictured with an example. Translation: the cell can make much or little protein from the same amount of RNA, depending on how often ribosomes start on it. Protein lifetime: a stable structural protein can stay high for days after its RNA has fallen, while a short-lived regulator disappears within minutes of its RNA dropping. Modification: as in the third case above, a protein can be present but inactive until a phosphate or other group is added. So a gene whose RNA doubles may show twice the protein, no change, or a change only some hours later.
The practical lesson is to decide which layer answers your question before you measure. If the question is whether a drug's target is present, the protein layer comes closest. If it is whether a gene has been switched on, RNA is the direct readout. Using one layer as a stand-in for another, for example reading RNA as if it were protein, is a common pitfall, and the moderate correlation between the two is why it can mislead.
When the layers meet: early, intermediate and late
Once you have several layers for the same patients, you need a way to analyse them together. A feature is one measured variable: one gene's expression, one CpG site's methylation, one protein's level. The three main strategies differ in when the layers are joined.
| Strategy | How it works | Trade-off |
|---|---|---|
| Early | Join all features into one big table, then model it | Simple, but the largest layer dominates |
| Intermediate | Learn shared hidden factors across layers (for example, MOFA) | Captures links between layers; harder to interpret |
| Late | One model per layer, then combine predictions | Robust to missing layers; misses interactions |
How to read this table
Read the rows as early, middle and late points at which the layers meet. A few terms need unpacking:
- "The largest layer dominates." With 20,000 genes and 450,000 CpG sites in one table, methylation supplies more than 95% of the features, so a model can end up mostly describing methylation. Each layer is usually scaled first so that no layer wins just by size.
- A hidden factor (also called a latent factor) is a pattern that is not measured directly but shows up in several layers at once. For example, a factor might rise with the number of immune cells in a tumour, raising immune genes' RNA and changing methylation at the same genes. MOFA (Multi-Omics Factor Analysis) is a widely used method that finds such factors and reports how much of each layer's variation each one explains.
- "Robust to missing layers." In real cohorts, some patients lack one assay. A late strategy can still use the layers a patient does have. An interaction is an effect that appears only when two layers are looked at together, such as a mutation that matters only when the gene is also expressed; separate models per layer cannot see it.
Go deeper: scaling layers, not just features
The lesson says each layer is usually scaled so that no layer wins by size. Scaling each feature to the same spread is not enough on its own. If every feature has a variance of 1, a layer with 450,000 features still carries 450,000 units of variance, against 20,000 for RNA.
So integration methods often scale whole blocks as well. One simple way is to divide every feature in a layer by the square root of the number of features in that layer, so each layer contributes the same total variance. Multiple factor analysis, an older relative of MOFA, divides each layer by its own largest singular value, so that no single layer's main pattern dominates. Factor models such as MOFA handle this inside the model by giving each layer its own noise level. Whatever method you use, state how the layers were weighted, because it changes the answer.
What guides the joining: knowledge, data, or both
The table above is about when layers meet. A second question is what decides which features belong together. There are three broad answers.
- Uses what is already known: pathway databases such as KEGG and Reactome, interaction networks such as STRING (Biological networks and systems biology)
- Easy to interpret; blind to the unknown
- Finds patterns in the numbers alone: clustering, factor methods, machine learning
- Can discover new links; can be hard to explain
- Finds patterns in the data, then checks or constrains them with known biology
- The usual choice in practice
Pathway-based integration is the most common knowledge-based approach, and it builds directly on Pathways and enrichment analysis. Each layer is first analysed on its own, then its results are placed on the same pathway map. Suppose cells grown in low oxygen show higher RNA for several glycolysis enzymes and more lactate in the metabolome. Lactate is the end product of glycolysis when oxygen is short, so the two layers tell one consistent story about the same pathway, and the story is far stronger than either layer alone. The weakness is that pathway maps are incomplete: a gene or metabolite missing from the database simply drops out, and poorly studied organisms have thin maps.
A data-driven method makes no such assumption. MOFA, for example, is not told which genes form pathways; it finds factors from the numbers, and you interpret them afterwards, often by running the enrichment test of Pathways and enrichment analysis on the genes that weigh most on each factor. That last step is what makes most real analyses hybrid.
The first practical problem: who has which layer
Before any method can run, the layers must be lined up by sample. The small example below needs only pandas, already in Colab. The values are made up for teaching.
import pandas as pd
# Made-up values for teaching: RNA and protein for the same gene, ERBB2
rna = pd.DataFrame({"patient": ["P1", "P2", "P3", "P4", "P5", "P6"],
"ERBB2_rna": [12.1, 5.2, 11.8, 4.9, 5.5, 12.6]})
protein = pd.DataFrame({"patient": ["P1", "P2", "P3", "P5", "P7"],
"HER2_protein": [3, 0, 2, 1, 3]})
both = rna.merge(protein, on="patient", how="inner") # early: one table
print(both)
print("Patients with RNA:", len(rna), "| with protein:", len(protein),
"| with both:", len(both))
anyone = rna.merge(protein, on="patient", how="outer") # keep everyone
print("Missing values after an outer join:", anyone.isna().sum().sum())What this does
- Two small tables are made, one per layer: ERBB2 RNA level (on a log scale, where higher is more) and the HER2 IHC score from 0 to 3. Patients P4 and P6 have only RNA; P7 has only protein.
merge(..., on="patient", how="inner")joins the tables row by row, matching on the patient column, and keeps only patients present in both. That is the first step of early integration.how="outer"keeps every patient from either table and fills the gaps withNaN, pandas' marker for a missing value.isna().sum().sum()counts them.
Reading the output
The joined table has four patients, not six or five. Two patients with RNA and one with protein were dropped without any warning. The outer join keeps all seven but leaves three empty cells. In this tiny example the layers also agree: high RNA (P1, P3) goes with IHC 2+ or 3+. In a real cohort of hundreds, losing a third of the patients at the join, or filling hundreds of gaps with guesses, changes the answer. Count the patients at every join and report how missing layers were handled.
A quieter version of the same problem is a mismatch in sample names. If one laboratory writes P01 and another P1, an inner join silently drops both, and the count of patients at the join is the first place it shows. Worse is a sample swap, where two samples are labelled the wrong way round: the join succeeds, but the layers now describe different people. Because every layer that comes from DNA or RNA carries the person's own variants, studies can check that each patient's layers really match by comparing those variants across assays, and swaps found this way are more common than most people expect.
The challenges
- Different scales and noise. Counts, methylation fractions between 0 and 1 and mass-spectrometry intensities cannot be compared directly. Each layer needs its own normalisation before anything is joined.
- Far more features than samples. The worked example below shows the size of the problem.
- Missing layers. Few studies can afford every assay on every sample, as the code showed.
- Batch effects. A batch effect is a difference caused by how or when samples were processed, not by biology. If all tumours were run on one day and all controls on another, the two can no longer be separated.
- Matching names. Linking a gene to its protein, or a metabolite between databases, needs the identifier mapping of Identifiers and cross-references: following one gene across databases, and is hardest for metabolites and lipids.
- Timing. Metabolites can change within minutes and RNA within hours, while DNA is stable. A sample is a snapshot, and the layers may be out of step.
- Interpretation. A model that predicts well but cannot say why is hard to turn into biology or treatment.
Of these, batch effects deserve a special word, because the best defence is in the design, not the analysis. Spread each group across batches, so that every batch holds some tumours and some controls. Statistical corrections exist, but they can only remove a batch effect that is not tangled up with the biology you want to measure. In a multi-omics study the risk doubles: each layer may have been run in its own batches, at different times and even in different laboratories.
Worked example · the main trap
features per patient = 470,000 ÷ 500 = 940
With nearly a thousand features per patient, a model can fit noise perfectly and fail on new patients: overfitting. Feature selection, regularisation and independent validation guard against it.
Step by step. Add the features of the two layers: 20,000 + 450,000 = 470,000. Divide by the number of patients: 470,000 ÷ 500 = 940. Of the 470,000 features, 450,000 ÷ 470,000, about 96%, are CpG sites, which is the "largest layer dominates" problem from the table.
What the answer means. When features far outnumber patients, some features will line up with the outcome purely by chance, and a model can use them to describe these 500 patients perfectly. On new patients those chance patterns are absent, and the model fails. Feature selection keeps only a small set of features chosen for a reason, for example the most variable genes. Regularisation adds a penalty that pushes the model to use few features, or small weights, unless the data strongly support more. Independent validation tests the finished model on patients it was not built on. A signature built and judged on the same patients will almost always look good; only the validation result tells you whether it works. Module 8 returns to this with machine learning.
Key point
Integration is worth the complexity when layers answer different parts of the question. Choose when the layers meet (early, intermediate or late) and what guides them (knowledge, data or both) to suit that question. Adding layers for their own sake mostly adds features, and with them the risk of overfitting.
A second example: to find which breast cancers will respond to trastuzumab, the genome and protein layers answer the question directly, because the drug targets HER2 and HER2 status is decided from those two layers. Adding the whole metabolome to the same model would add thousands of features with no clear link to the drug's target. Start from the question, and add a layer when you can say what part of the question it answers.
Further reading · Module 7MOFA2 documentation: tutorials for finding shared factors across layers. · Reactome: browse pathways and overlay your own data on them. · All reading for this course
Check your understanding
1. Some patients in a cohort lack proteomics data. Which strategy copes best?
2. RNA for glycolysis enzymes and lactate in the metabolome both rise, and are read on the same pathway map. What kind of integration is this?
3. 300 patients and 60,000 features. The main risk?
Up next
Lesson 7
Simulating biology: models, agents and digital twins