Time-Series Gene Set Enrichment Analysis — Dynamic Pathway Enrichment Across Time Points

Research
Introduced by
Extension of GSEA (Subramanian et al., 2005); time-series adaptations developed through maSigPro (Conesa lab) and related tools
Year
2005 (GSEA foundation); time-series adaptations 2007–2014
Type
Gene set enrichment method for longitudinal omics data
Family
Bioinformatics / omics

What does it do?

Time-series gene set enrichment analysis (TS-GSEA) extends the classical GSEA framework to detect gene sets (pathways, Gene Ontology terms or curated signatures) whose expression changes coordinately over an ordered series of time points.

Instead of comparing two snapshots, it summarises each gene's temporal trajectory before scoring gene sets, so it can identify functional programs that are activated, suppressed or remodelled during a process such as development, treatment response or disease progression.

The intuition behind the method

Classical GSEA ranks genes by a single two-condition comparison and asks whether members of a gene set cluster at the top or bottom of that list. In a time-course experiment the same question has to be answered for an ordered sequence of measurements, for example at 0, 6, 12, 24 and 48 hours after treatment. TS-GSEA first models how each gene's expression changes across that sequence, for instance with polynomial or spline regression, and reduces the fitted trajectory to a temporal summary statistic per gene. Standard or adapted enrichment scoring is then run on that ranking. The reported gene sets are those whose coordinated dynamics, not only their level at one time point, differ from background.

History

Gene set enrichment analysis was introduced by Subramanian et al. in 2005 as a knowledge-based approach for interpreting genome-wide expression profiles. It groups genes by shared biological function, chromosomal location or regulation, so that coordinated but modest pathway-level effects can be detected when single-gene analysis finds little. Time-series extensions were developed to handle ordered sampling. maSigPro was originally developed for microarray time-course data, and its RNA-seq update by Nueda et al. in 2014 introduced generalised linear models for count data.

When to use it

Choose TS-GSEA when you have RNA-seq or microarray data from an ordered time course, such as developmental stages, treatment time points, circadian sampling or serial patient sampling, and the question is which pathways change coordinately over that time rather than at one contrast. It suits gradual, progressive or oscillatory pathway-level trends that disappear when the data are collapsed into a single fold-change comparison. Do not use it with only two time points; standard GSEA on the single contrast is the appropriate tool there. Do not use it when there are fewer than three replicates per time point, because temporal modelling becomes unreliable, or when the interest lies in individual named genes. It is also unsuitable for cross-sectional data without genuine temporal ordering.

Limitations and considerations

  • Needs at least three ordered time points; with two, the temporal ranking gains nothing over a standard two-condition contrast.
  • The temporal model (polynomial degree, spline knots, impulse parameters) changes the ranking and therefore the enriched sets, so these choices need biological justification and sensitivity checks.
  • With fewer than three replicates per time point the temporal regression is unreliable, and the enrichment scores built on it inherit that instability.
  • Results depend on the gene set database and its version; membership changes between releases, which affects reproducibility.
  • Standard GSEA label permutation may not preserve the temporal correlation structure of repeated measurements, so the permutation scheme has to be designed for time-series data.
  • Repeated measures from the same subject are correlated, so the temporal model must account for within-subject correlation (for example with a mixed-effects term), and unevenly spaced time points change the temporal basis and need explicit modelling rather than treatment as equal intervals.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Scores gene sets across the full time course, so a pathway whose pattern unfolds gradually can be detected even when no single time-point contrast is strong.
  • Tests gene sets rather than thousands of individual genes, which reduces the number of hypotheses reported and makes results easier to read in pathway terms.
  • Uses curated databases such as MSigDB, KEGG and Reactome, so the output is tied to named pathways.
  • Works with existing GSEA tooling, such as the GSEA desktop application or fgsea, once a temporal ranking has been produced.
  • The choice of temporal model determines which dynamics can be detected: polynomial or spline bases capture monotonic or curved trends, and sinusoidal models capture oscillations.

Applications

  • Identifying which developmental pathways are sequentially activated during embryogenesis or organoid differentiation time courses.
  • Characterising the temporal immune response to vaccination or infection by tracking pathway activation waves from early innate to late adaptive programs.
  • Profiling transcriptional reprogramming kinetics following drug treatment to distinguish early direct targets from late secondary effects.
  • Detecting circadian pathway oscillations in metabolic or neurological gene expression datasets sampled across the 24-hour cycle.
  • Monitoring progressive pathway dysregulation across disease stages in longitudinal patient cohorts with serial biopsies or blood draws.
  • Comparing the dynamics of signalling pathways across experimental conditions (e.g., wild-type vs. knockout) to identify altered temporal regulation.

How it works

How it works

1

Define the time points, biological replicates and covariates such as treatment group or batch. The temporal component needs at least three ordered time points; with only two, the analysis reduces to a standard two-group comparison. Prepare a count or normalised expression matrix in which each sample is annotated with its time point and covariates.

2

Fit a temporal model to each gene, typically a regression with polynomial, natural spline or piecewise basis functions over time, or a mixed-effects model; maSigPro is an example of a tool for this step. The model identifies genes with significant temporal variation and describes the shape of each time-course profile, and the temporal trend is reduced to a test statistic or effect-size score per gene. Batch or plate terms should be included at this stage, because uncorrected confounders inflate false positives at both the gene and gene-set level. Where several samples come from the same subject, the model must account for within-subject correlation, for example through a mixed-effects term.

3

Rank genes by the temporal summary statistic, for example the F-statistic for overall time dependence, a weighted sum of pairwise log fold changes between adjacent time points, or the amplitude from a sinusoidal model for circadian data. The ranking should reflect behaviour across the whole series rather than a single time-point contrast. An overall F-statistic is non-directional: it ranks genes by strength of temporal change but does not indicate whether they rise or fall, so a signed quantity is needed for directional interpretation. Circular quantities such as the phase of a sinusoidal fit should not be used as a direct ranking statistic, because treating them as linear values gives misleading enrichment; amplitude or a signed statistic is the appropriate alternative.

4

Apply a running-sum enrichment score, as in GSEA, to the temporally ranked gene list against a gene set database such as MSigDB, KEGG, Reactome or GO. The enrichment score (ES) measures how strongly members of a gene set concentrate at the top or bottom of the ranking relative to the rest of the genome.

5

Assess significance by permutation, and compute a normalised enrichment score (NES) and a false discovery rate (FDR) q-value for each gene set. Standard GSEA permutes sample labels, which may not preserve the temporal correlation structure of repeated time-course measurements, so the permutation scheme has to be chosen to match the design. Where samples are repeated from the same subject or series, permute whole subject or series units rather than individual samples, so that within-subject structure is retained. Permuting gene set membership is an alternative, but it rests on stronger assumptions and should be justified and checked with a sensitivity analysis. Report sets at FDR < 0.05, or at FDR < 0.25 following the original GSEA convention, and state the permutation scheme used.

6

Report gene sets with significant NES and FDR. The sign of the NES is interpretable only when the ranking has a direction, for example a signed slope fitted over time: positive values then indicate enrichment among genes that rise over time and negative values among genes that fall. With a non-directional ranking such as an overall F-statistic, the sign does not carry this meaning, and direction must be taken from the fitted profiles. Examine the GSEA leading-edge genes and plot their temporal profiles to check biological coherence.

Common pitfalls

  • Ranking genes by the fold change at one time point discards every other time point and reduces the analysis to standard GSEA.
  • Omitting batch or plate terms from the temporal model inflates false positives for both gene-level trends and gene-set scores.
  • Treating small leading-edge sets as strong evidence: small sets give unstable NES values, so leading-edge size should be checked before a set is reported.
  • Reporting nominal p-values instead of NES-based FDR q-values inflates the false discovery rate, because many gene sets are tested at once.
  • Treating a significant NES as causal: it shows that a gene set's members covary with time, not that the pathway drives the observed phenotypic change.
  • Accepting the default gene set size filters of the tool without checking them: very small sets give unstable NES values, and very large sets dilute the signal, so set the minimum and maximum size filters deliberately and report them.

Frequently asked questions

Can I use standard GSEA directly on time-series data without a temporal model?

Only if you restrict the comparison to two time points (e.g., baseline vs. final). If you have more than two time points, running GSEA on a single pairwise contrast discards all intermediate information. The correct approach is to first derive a temporal summary statistic per gene from a regression or equivalent model, then use that statistic to rank genes for enrichment scoring.

Which R packages are commonly used for TS-GSEA?

A typical pipeline combines maSigPro (for temporal differential expression and gene ranking) with a GSEA implementation such as the GSEA desktop application or fgsea (for enrichment scoring). The clusterProfiler package provides convenient wrappers for GSEA-style analysis, including KEGG and GO databases. For circadian data, JTK_CYCLE or RAIN are used to extract temporal statistics before enrichment testing.

How many time points and replicates do I need?

At least three ordered time points are needed for temporal modelling to be meaningful. Fewer than three replicates per time point makes the temporal regression unreliable, so replicate number matters as much as the number of time points. Power generally improves with more time points and more replicates per point. Beyond these minima, the required sample size depends on the temporal model and the expected effect sizes, so estimate the power of the chosen model before running the experiment.

What is the difference between TS-GSEA and standard GSEA on a single time-point comparison?

Standard GSEA operates on a ranked gene list derived from one contrast (e.g., treated vs. untreated at 24 h). TS-GSEA derives the ranking from a statistic that summarises the gene's behaviour across the entire time course — such as the overall F-statistic for temporal change or a weighted sum of sequential fold changes. This allows detection of pathway-level dynamics that are not captured by any single time-point comparison alone.

How should I choose the gene set database?

For general pathway analysis, the Hallmark or C2 curated gene sets in MSigDB are widely used and well-validated. For specific biological questions, KEGG and Reactome provide pathway-level resolution with mechanistic annotations. GO Biological Process is appropriate when functional terms rather than curated pathways are of interest. Always record the database version used, as gene set membership changes between releases and affects reproducibility.

Related methods

Sources

  1. Subramanian, A., Tamayo, P., Mootha, V. K., Mukherjee, S., Ebert, B. L., Gillette, M. A., Paulovich, A., Pomeroy, S. L., Golub, T. R., Lander, E. S., & Mesirov, J. P. (2005). Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles. Proceedings of the National Academy of Sciences, 102(43), 15545–15550.

    Open DOI reference
  2. Nueda, M. J., Tarazona, S., & Conesa, A. (2014). Next maSigPro: updating maSigPro bioconductor package for RNA-seq time series. Bioinformatics, 30(18), 2598–2602.

    Open DOI reference