Tutorials › High-Dimensional Genomic Data Analysis › Dynamic Tree Cutting For Co-Expression Modules

Co-Expression Networks · Tutorial 499 of 795

Dynamic Tree Cutting For Co-Expression Modules

Learn to interpret and tune dynamic tree cuts, including how minimum module size and cut sensitivity change which genes are assigned to co-expression modules.

Advanced 11 min read

What You'll Learn

  • Explain what a dynamic tree cut does to a gene dendrogram.
  • Distinguish minimum module size from cut sensitivity.
  • Trace how parameter choices change module assignments in worked examples.
  • Recognize unassigned genes and implementation-dependent reassignment.
  • Diagnose over-fragmented, over-merged, and parameter-sensitive cuts.
  • Compare dynamic cutting with a fixed-height dendrogram cut.

From a Gene Dendrogram to Module Labels

Hierarchical gene clustering represents genes as leaves of a dendrogram; branches record the order and dissimilarity at which groups of genes join. For co-expression analysis, the clustering may use a topological-overlap dissimilarity, so genes can group together through shared network neighborhoods as well as direct pairwise similarity. The dendrogram does not, by itself, specify how many modules to report. Dynamic tree cutting is a way to identify candidate modules by examining branch structure rather than applying one horizontal cut across the entire tree.

The word “dynamic” does not mean that gene assignments change over time. It refers to an adaptive procedure that considers the local structure of branches. A broad, well-separated branch and a narrow twig need not be treated by the same global height rule. The resulting labels are a partitioning decision based on the chosen dendrogram and settings, not a statistical test or a set of probability statements.

Definition: A dynamic tree cut is an algorithmic procedure for identifying candidate clusters (co-expression modules) from a hierarchical clustering tree by assessing branch structure, subject to settings such as minimum module size and cut sensitivity. A module assignment is the label given to a gene by the procedure. Genes not assigned to a retained module may be marked unassigned; some implementations also offer a separate reassignment step.

The input is a dendrogram whose leaves are genes, built from a chosen gene-pair dissimilarity and hierarchical clustering method. The cut procedure does not repair an unsuitable dissimilarity or clustering, and it does not establish that a module is biologically meaningful. Its output depends on the upstream choices as well as its own settings.

What the Main Settings Control

Two settings are particularly important. Minimum module size is a lower bound on the number of genes that a retained module must contain. Cut sensitivity controls how readily the procedure identifies smaller, more finely separated branches as distinct modules. In the Dynamic Tree Cut software, sensitivity is often controlled through a parameter called deepSplit; the precise choices and implementation details depend on the method and software version.

Increasing sensitivity generally makes the cut more willing to split a larger branch into smaller modules. It does not mean that the evidence is more statistically significant, nor does it correspond to a smaller p-value. Raising the minimum size has a different role: small candidate clusters may fail the size requirement. Whether such genes remain unassigned or can be reassigned to another module depends on the method and on whether an optional reassignment stage is used.

Setting or choiceMain effectInterpretive caution
Minimum module sizeExcludes candidate clusters below a specified gene countA threshold chosen for the analysis, not a universal biological boundary
Cut sensitivityChanges how readily branch structure is split into separate modulesHigher sensitivity can produce more and smaller modules; it is not a significance level
Reassignment optionMay place some initially unassigned genes into retained modulesFinal labels then reflect this additional rule, not only the initial branch cut

There is no single best setting for every dendrogram. A minimum size of 20, for example, may be reasonable for one analysis and unsuitable for another with fewer genes or a different scientific objective. The settings should be reported alongside the method, the gene set, the dissimilarity, and the clustering choices.

Worked Example: Applying a Minimum Module Size

Consider a hypothetical dendrogram built from 24 genes using a TOM-based dissimilarity. Suppose a dynamic cut, at a fixed sensitivity, identifies three candidate branches: A with 11 genes, B with 8 genes, and C with 5 genes. There are no other genes in this toy example. Compare minimum module sizes of 4 and 6, with no reassignment stage.

With minimum size 4, all three candidates pass: \(11 \geq 4\), \(8 \geq 4\), and \(5 \geq 4\). The output has three modules containing \(11+8+5=24\) genes.

With minimum size 6, branches A and B pass, but C does not because \(5<6\). Under the stated no-reassignment setting, the 5 genes in C are unassigned. There are then two retained modules containing \(11+8=19\) genes, plus 5 unassigned genes. The threshold did not show that C is false or unimportant; it changed which candidate groups were retained as modules.

This calculation assumes that the stated candidate branches are the cut’s output and that no later stage changes membership. In practice, a different minimum-size setting may affect the procedure’s branch selection itself, and reassignment options may alter the final labels. Those options must be checked rather than inferred from the minimum-size value alone.

Why a Dynamic Cut Differs From One Height Cut

A fixed-height cut draws a horizontal line across the tree. It groups leaves that have joined below that line, so one global height determines the partition. A dynamic cut instead adapts its decisions to branch shape and local separation. This can distinguish a compact branch from an elongated branch even when parts of the tree have different overall merge-height scales.

The monotonic behavior of a fixed-height cut follows directly from the tree. Let \(h\) be the cut height. At that height, groups joined by merges at or below \(h\) belong to the same cluster, while branches that have not yet joined remain separate. If \(h_1<h_2\), every merge included at \(h_1\) is also included at \(h_2\). Thus, raising the cut height can combine clusters but cannot split a cluster already formed at the lower height. A dynamic cut is not governed by this single global threshold; changing its sensitivity may instead alter local branch splits.

Dynamic-cut algorithms have implementation-specific rules for assessing branches. Some approaches use the tree alone; hybrid approaches can also use the original dissimilarities. Options such as cut height, sensitivity, and reassignment can matter. Therefore, the general interpretation—adaptive branch-based grouping—is stable, but an exact assignment should be understood relative to the particular algorithm and settings used.

Worked Example: Increasing Cut Sensitivity

Suppose a hypothetical 18-gene branch contains two internally compact subbranches of 10 and 8 genes. Their within-subbranch merge heights range from 0.04 to 0.16, while the two subbranches join each other at height 0.38. The surrounding branches join this 18-gene branch only at height 0.62. Assume a dynamic-cut implementation returns one 18-gene module at a low sensitivity setting and two modules at a higher setting, with minimum module size 6.

At low sensitivity, the algorithm does not treat the separation at height 0.38 as sufficient evidence, under its branch criteria, to split the parent branch. It retains one module of 18 genes. At higher sensitivity, it resolves the two compact subbranches; both meet the minimum size because \(10 \geq 6\) and \(8 \geq 6\). The result is two modules, of 10 and 8 genes.

The height values describe the hypothetical tree, but they do not alone determine the dynamic-cut result. The stated outputs are assumptions about this example’s algorithm and settings. They illustrate the role of sensitivity: it can make an existing local split count as a module boundary. Neither setting proves that the two groups have distinct biological functions.

Assumptions, Diagnostics, and Failure Modes

Dynamic tree cutting is an algorithm, not a model-based inferential procedure, so it does not require a sampling distribution for module labels. Its practical requirements are about the input and the interpretation. The dendrogram must correspond to the intended genes, the merge heights and leaf labels must be valid, and the chosen distance and clustering should be meaningful for the scientific question. If the dendrogram is built from a dissimilarity that does not reflect the intended notion of co-expression, an adaptive cut cannot make the resulting modules valid.

Before interpreting modules, check that all intended genes appear once as leaves and inspect the tree and its merge heights. Record how many genes were assigned, how many were unassigned, and the size of each module. Plot or otherwise compare the results across several plausible sensitivity and minimum-size settings. A solution that changes dramatically after a small setting adjustment should be described as parameter-sensitive, not as a uniquely determined partition.

  • Too many tiny groups: A high sensitivity setting may split branches into many small candidates. Check their sizes and whether the splits reflect clear branch structure rather than minor local distinctions.
  • Too few broad groups: Low sensitivity or a restrictive minimum size can obscure smaller structure. Consider whether the analysis objective allows smaller modules; do not lower the threshold only to obtain a preferred result.
  • Many unassigned genes: This may arise when candidate branches fail the minimum-size rule. Report the count and investigate whether the tree contains many isolated twigs or the size threshold is mismatched to the intended analysis.
  • Confusing a setting with evidence: A higher sensitivity setting does not increase confidence in a module. It changes the algorithm’s willingness to split branches.

A common mistake is to say, “The module has fewer than the minimum number of genes, so those genes do not co-express.” The cut only says that the candidate group did not satisfy a chosen retention rule. The genes may still have related expression patterns; they have simply not been retained as a module by this configuration. A second mistake is to interpret a color or numeric module label as an ordered score. These labels identify groups; their values do not measure strength or rank.

Alternatives and Scope

A fixed-height cut is simpler to describe and reproduce: it uses one height across the tree. It can be useful when a global threshold has a clear rationale, but it may perform poorly when branches have different shapes or merge-height scales. Dynamic cutting allows local adaptation, at the cost of settings that require explicit reporting and sensitivity assessment.

Community detection methods operate on a network representation and optimize or approximate a network partitioning objective. They offer a different route to grouping genes, but they do not apply a cut to the hierarchical dendrogram. The choice between these approaches depends on the analysis goal and input representation; neither guarantees biologically coherent modules. This tutorial concerns the conversion of a gene dendrogram into candidate module assignments, not the subsequent merging of similar modules or the biological validation of labels.

Key takeaway: Minimum module size controls which small candidate groups can be retained; cut sensitivity controls how readily the tree is split into finer groups. Both are analysis choices. Report them, inspect unassigned genes, and check whether the main conclusions persist across reasonable settings.

Worked Example: Comparing Two Plausible Settings

In a hypothetical 100-gene analysis, a lower-sensitivity cut with minimum size 10 returns modules of 42, 31, and 17 genes, leaving 10 unassigned. A higher-sensitivity cut with the same minimum size returns modules of 25, 17, 16, 15, and 12 genes, leaving 15 unassigned. Assume the listed sizes are the actual output under each setting, and no reassignment is performed.

For the first setting, the assigned total is \(42+31+17=90\), so \(100-90=10\) genes are unassigned. For the second, the assigned total is \(25+17+16+15+12=85\), so \(100-85=15\) are unassigned. Each retained module meets the minimum size of 10. The higher sensitivity yields more modules and, in this hypothetical output, more unassigned genes; this is a result of the assumed algorithm outputs, not a universal guarantee about every implementation.

The comparison shows why module counts alone are insufficient. Report module sizes and unassigned counts, and inspect whether the finer splits correspond to recognizable branches. If the scientific conclusion depends on treating one 42-gene group as a single module rather than several smaller groups, the cut choice is consequential and should be stated as a limitation.

Check Your Understanding

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

  1. A dynamic cut identifies candidate groups of 14, 7, and 3 genes. With minimum module size 5 and no reassignment stage, how many genes are assigned and how many are unassigned?
  2. What does increasing cut sensitivity generally do, and what does it not mean?
  3. Why can a dynamic cut produce a different partition from a single fixed-height cut?
  4. What should be reported when many genes are unassigned after a cut?

Solutions. (1) The groups of 14 and 7 pass because \(14 \geq 5\) and \(7 \geq 5\); the group of 3 fails because \(3<5\). Thus 21 genes are assigned and 3 are unassigned, under the stated no-reassignment condition. (2) Higher sensitivity generally makes the procedure more willing to split branches into smaller modules. It is not a smaller p-value, greater statistical significance, or stronger evidence. (3) A fixed-height cut uses one global threshold, whereas a dynamic cut assesses local branch structure and can apply different effective decisions in different parts of the tree. (4) Report the number of unassigned genes, the module-size distribution, and the cut settings. Inspect whether small branches or the chosen minimum-size rule explain the result, and check whether conclusions change under plausible settings.

Clinical Biostats