Tutorials › High-Dimensional Genomic Data Analysis › Deriving And Interpreting Module Eigengenes

Co-Expression Networks · Tutorial 501 of 795

Deriving And Interpreting Module Eigengenes

Learn to construct a module eigengene from centered, standardized expression data and interpret its scores as a one-dimensional summary of shared expression.

Advanced 10 min read

What You'll Learn

  • Define the expression matrix and the scaling convention used for a module eigengene.
  • Derive the first principal component by maximizing score variance.
  • Calculate eigengenes, sample scores, and variance explained from small examples.
  • Explain why a principal component’s sign is arbitrary and how to orient it consistently.
  • Diagnose weak, unstable, or biologically misleading module summaries.
  • Compare the eigengene with a simple average of module-gene expression.

Why Summarize a Module?

A co-expression module can contain many genes measured across the same samples. Looking at every profile at once makes it difficult to describe the module’s overall pattern. A module eigengene compresses those profiles into one score per sample, chosen to capture as much variation among the module genes as a single linear summary can. It is useful as a concise description of shared expression, but it is not a new measurement of a gene, nor does it establish why the genes covary.

The construction depends on how expression profiles are represented. Here, the convention is to center and standardize each gene across samples before calculating principal components. This gives each gene equal variance in the PCA, so genes with large measurement scales do not dominate solely because of their units or spread. Other software or analyses may use different preprocessing; the scaling choice should therefore be reported.

Definition: Suppose a module contains \(q\) genes measured in \(n\) samples. Let \(X\) be the \(n \times q\) expression matrix, with samples in rows and genes in columns. For gene \(j\), subtract its sample mean and divide by its sample standard deviation to obtain the standardized matrix \(Z\). The module eigengene is the first principal-component score vector \(e_1=Zv_1\), where \(v_1\) is a unit eigenvector for the largest eigenvalue of \(S=Z^\mathsf{T}Z/(n-1)\). Each entry of \(e_1\) is that sample’s eigengene score.

This definition assumes that each included gene has nonzero sample standard deviation; a constant gene cannot be standardized and must be excluded or handled separately. The matrix \(S\) is the sample correlation matrix of the included genes, because the columns of \(Z\) have been standardized. PCA can be calculated algebraically without assuming that samples are independent or normally distributed. Such assumptions matter for particular inferential procedures, not for defining the component. For interpretation, however, samples should be comparable measurements: unaddressed batch effects, cell-mixture differences, or other technical structure can drive the leading component instead of the expression pattern of biological interest.

Deriving the First Principal Component

A linear summary of the standardized gene values in sample \(i\) has the form \(z_i^\mathsf{T}v\), where \(z_i\) is row \(i\) of \(Z\), and \(v\) is a vector of gene weights. Without a constraint on the weights, multiplying \(v\) by an arbitrarily large constant would make the score variance arbitrarily large. PCA restricts \(v\) to have length one and chooses the direction with the largest score variance.

$$ \operatorname{Var}(Zv)=v^\mathsf{T}Sv,\qquad v^\mathsf{T}v=1. $$

To see why the maximizing direction is an eigenvector, impose the unit-length constraint with a Lagrange multiplier \(\lambda\). At a stationary point of \(v^\mathsf{T}Sv\) subject to \(v^\mathsf{T}v=1\), the gradient of \(v^\mathsf{T}Sv-\lambda(v^\mathsf{T}v-1)\) is zero. Since \(S\) is symmetric, this gives \(2Sv-2\lambda v=0\), or \(Sv=\lambda v\). The variance in this direction is then \(v^\mathsf{T}Sv=\lambda v^\mathsf{T}v=\lambda\). Thus the direction with the largest eigenvalue gives the largest possible variance among unit-length linear summaries.

$$ S v_1=\lambda_1 v_1,\qquad e_1=Zv_1,\qquad \operatorname{Var}(e_1)=\lambda_1. $$

The first component’s proportion of total standardized gene variance explained is \(\lambda_1/\sum_{j=1}^{q}\lambda_j\). Because each standardized gene has variance one, the total is \(\sum_j\lambda_j=q\). A large proportion indicates that the module’s expression profiles can be summarized efficiently along one direction; it does not by itself establish that the direction is biologically meaningful.

Worked Calculations

Worked Example: Two Positively Co-Expressed Genes

Suppose a hypothetical module contains two standardized gene profiles, and their sample correlation is \(0.8\). The correlation matrix is

$$ S= \begin{pmatrix} 1 & 0.8\\ 0.8 & 1 \end{pmatrix}. $$

The vector \(v_1=(1,1)^\mathsf{T}/\sqrt{2}\) is an eigenvector: multiplying gives \(Sv_1=1.8v_1\). The perpendicular vector \(v_2=(1,-1)^\mathsf{T}/\sqrt{2}\) has eigenvalue \(0.2\). Therefore the first eigengene score for a sample with standardized expression values \(z=(2,1)^\mathsf{T}\) is

$$ e_1=z^\mathsf{T}v_1 =\frac{2+1}{\sqrt{2}} =\frac{3}{1.4142} \approx 2.121. $$

The first component explains \(1.8/(1.8+0.2)=0.9000\), or 90.00% of the two genes’ total standardized variance. A high score in this orientation corresponds to both genes tending to be above their sample means; a low score corresponds to both tending to be below their means. The example describes a hypothetical correlation structure and sample, not an observed study.

Worked Example: A Module With Opposing Expression

For a hypothetical two-gene module, suppose the standardized gene profiles have correlation \(-0.6\):

$$ S= \begin{pmatrix} 1 & -0.6\\ -0.6 & 1 \end{pmatrix}. $$

The vector \(v_1=(1,-1)^\mathsf{T}/\sqrt{2}\) has eigenvalue \(1.6\), while \((1,1)^\mathsf{T}/\sqrt{2}\) has eigenvalue \(0.4\). For a hypothetical sample with \(z=(1,-1)^\mathsf{T}\), the score is

$$ e_1=z^\mathsf{T}v_1 =\frac{1-(-1)}{\sqrt{2}} =\frac{2}{1.4142} \approx 1.414. $$

The score is high because the first gene is above its mean while the second is below its mean, matching the dominant contrast. The first component explains \(1.6/(1.6+0.4)=0.8000\), or 80.00% of the total standardized variance. A module eigengene need not mean that all module genes move in the same direction; its weights describe the dominant pattern, which can include opposing contributions.

Worked Example: Three Genes and Variance Explained

Consider a hypothetical module of three standardized genes with pairwise correlations \(0.5\). Its correlation matrix has eigenvector \(v_1=(1,1,1)^\mathsf{T}/\sqrt{3}\) with eigenvalue \(2\); the two orthogonal contrast directions each have eigenvalue \(0.5\). For a sample with standardized expression \(z=(2,1,1)^\mathsf{T}\), the eigengene score is

$$ e_1=z^\mathsf{T}v_1 =\frac{2+1+1}{\sqrt{3}} =\frac{4}{1.7321} \approx 2.309. $$

The first component explains \(2/(2+0.5+0.5)=2/3\approx0.6667\), or 66.67% of total standardized variance. In this example all three genes have equal positive weights, so the score is proportional to their average standardized expression. The hypothetical sample has a positive score because its expression values are collectively above their standardized means.

Sign, Orientation, and Interpretation

If \(v_1\) is an eigenvector, then \(-v_1\) is also an eigenvector with the same eigenvalue. Replacing \(v_1\) by \(-v_1\) changes every score from \(e_1\) to \(-e_1\), but leaves the component direction, variance explained, and relationships among samples unchanged. Consequently, “positive eigengene score” has no intrinsic meaning until an orientation is selected.

A common convention is to orient the component so that its scores have positive correlation with the average standardized expression of the module genes, when that correlation is nonzero. This makes positive scores tend to mean higher-than-average expression in the module’s overall direction. For a module whose dominant pattern is a contrast between gene groups, however, a simple average can be uninformative or can orient the component poorly. In that case, report the orientation rule and inspect the loadings. Changing the sign for display does not change the PCA result.

Interpretation: The eigengene score is a weighted sum of a sample’s standardized expression values for the module genes. It summarizes the dominant linear pattern across those genes. Its scale is the scale of principal-component scores, not an expression unit such as counts or log-expression; its sign is conventional and must be stated or consistently oriented.

Diagnostics, Alternatives, and Limitations

A useful eigengene should summarize a recognizable pattern rather than merely provide a number. Examine the proportion of variance explained, the leading loadings, and the score profile across samples. If the first eigenvalue is close to the second, multiple directions explain nearly as much variation. The first component still exists, but small changes to the data may rotate its direction substantially. When the leading eigenvalue is repeated exactly, the leading direction is not unique: any appropriate unit vector in that tied eigenspace is a valid first component.

Also check whether a few samples dominate the pattern and whether known technical structure aligns with the scores. Plotting gene profiles against the eigengene can reveal genes that do not follow the dominant trend. An eigengene may be driven by batch, cell composition, or an outlying sample; PCA does not automatically distinguish those sources from biological co-expression. If a gene is constant, nearly constant, or has unreliable measurements, standardization can fail or amplify noise, so preprocessing choices require care.

A simple alternative is the average standardized expression, \(q^{-1}\sum_j z_{ij}\). It is transparent and easy to compare across modules, but it gives every gene equal weight and may not capture the direction of greatest variation. The first principal component chooses weights to maximize variance under a unit-length constraint; it can therefore represent a stronger shared pattern, but its weights may be less immediately interpretable and can be sensitive when the leading eigenvalue is not well separated. PCA based on unstandardized centered expression is another alternative: it gives more influence to genes with larger variances. Neither scaling choice is universally correct; the choice should match the scientific meaning of the measurements and be stated explicitly.

The eigengene is a descriptive summary, not a causal explanation or a test of association with a phenotype. Its usefulness depends on the quality of the expression matrix and module definition. A single score necessarily loses information: genes that vary in directions orthogonal to the first component are not represented by that score. When the first component explains little variance, treating it as a complete summary is especially misleading.

Common Mistakes

  • Treating the sign as biologically fixed. A negative score is not inherently low expression until an orientation is specified; reversing all loadings reverses all scores without changing the component.
  • Calling the eigengene the average expression. It is a weighted principal-component score. It equals a rescaled average only in special cases, such as equal loadings.
  • Ignoring standardization. PCA on raw centered expression and PCA on standardized expression answer different questions. State which matrix was analyzed.
  • Equating high variance explained with biological validity. A component can capture batch effects or a few influential samples. Inspect its loadings and scores in context.
  • Interpreting the score in expression units. With standardized input, the score is a dimensionless weighted sum, not a count or a fold change.
Key takeaway: A module eigengene is the first principal-component score vector of the chosen module-expression matrix. It is the unit-length linear direction that captures the most variance, but its sign is arbitrary and its biological interpretation depends on preprocessing, orientation, and diagnostics.

Check Your Understanding

Answer each question, then compare with the concise solutions below.

  1. For two standardized genes with correlation \(0.4\), what is the first eigenvalue, and what proportion of their total variance does the first component explain?
  2. Why does reversing all first-component loadings not alter the PCA summary in substance?
  3. A module’s first component explains 35% of total standardized variance. Is that sufficient evidence that one eigengene captures the module well? Explain.
  4. What changes when PCA is performed on centered, unstandardized expression rather than standardized expression?

Solutions. (1) The eigenvalues are \(1+0.4=1.4\) and \(1-0.4=0.6\); the first component explains \(1.4/(1.4+0.6)=0.7000\), or 70.00%. (2) Reversing \(v_1\) reverses every score, but preserves the direction, score variance, and proportion explained; only the chosen sign convention changes. (3) No. A 35% share means most standardized variance lies outside the first direction, so one score may omit substantial structure; inspect additional components and the gene profiles. (4) Unstandardized PCA gives greater influence to genes with larger sample variances, whereas standardized PCA gives each gene unit variance before finding the leading direction.

Clinical Biostats