Skip to main content
    Genomics

    21 min read

    GSEA vs Over-Representation Analysis vs WGCNA: Which Pathway Method Fits Your Data

    One method tests a cut list against a background, one reads the whole ranked list, and one never looks at your contrast at all. What each one tests, and which number you are allowed to report

    Ivy Biosciences

    how this was written

    an AI agent, from a research brief and primary literature. reviewed and edited by the ivy biosciences team before publishing.

    If you have a ranked differential expression table, run pre-ranked GSEA (Subramanian et al., PNAS 2005). If all you have is a list of genes with no usable order — mutated genes, a marker set, a hand-curated panel — run over-representation analysis and spend your effort on the background set, not the method (Wijesooriya et al., PLOS Computational Biology 2022). If you have a cohort and no contrast worth testing, run WGCNA (Langfelder & Horvath, BMC Bioinformatics 2008) — it asks a different question entirely, and it is the only one of the three that can tell you something when you do not yet know which groups to compare.

    These are not three implementations of one test. They differ in what they take as input, in which null hypothesis they reject, and in how badly correlated genes break them. The common failure is not picking the wrong tool; it is reporting a number the method never computed.

    At a Glance#

    Over-representation analysisGSEAWGCNA
    Canonical referenceChen et al., 2013 (Enrichr)Subramanian et al., 2005Langfelder & Horvath, 2008
    Inputa cut list of genes + a backgrounda rank for every measured genean expression matrix, no contrast
    Threshold neededyes — you choose the cutnono
    What it testsis this set over-represented in my list relative to the backgrounddo this set's genes cluster at one end of the rankingwhich genes co-vary across samples
    StatisticFisher exact test; Enrichr adds a rank z-score and a combined scorerunning-sum enrichment score, normalised for set sizesoft-thresholded correlation, topological overlap, module eigengene
    Nullcompetitive (set vs its complement)competitive, by phenotype-label permutationnone — unsupervised
    Sensitive to inter-gene correlationyes, severely, when significance comes from permuting genesmitigated by permuting sample labels insteadthe correlation is the signal
    Sample-size floor (published guidance)around 5 per group (Maleki et al., 2019)around 10 per group for label permutation (same)15 minimum, 20 preferred (WGCNA FAQ)
    Typical runtime per datasetseconds7.7 s to 32.6 min across 10 methods (GSEA was the slowest)minutes to tens of minutes
    On .bloom*enrichr_enrichment, or gseapy_enrichment with method: "enrichr"gseapy_enrichment with method: "prerank"pywgcna_network

    Two rows in that table do most of the work. The threshold row explains why the methods disagree on the same data: over-representation analysis only sees genes you promoted past a cut, so a coordinated 20% shift across a pathway is invisible to it. The inter-gene correlation row explains why a published enrichment p-value is often orders of magnitude too small.

    The three methods, and the question each one asks#

    Over-representation analysis: a cut list against a background#

    You pick a threshold, you get a list of genes, and for each annotated gene set you build a 2×2 table: in the list or not, in the set or not. A Fisher exact test on that table gives the p-value. That is the whole method, and its simplicity is a real virtue — in the most careful benchmark of enrichment methods to date, over-representation analysis gave relevance levels statistically indistinguishable from the best-performing competitive method tested (P = 0.85), which the authors read as support for its usefulness as a fast method (Geistlinger et al., Briefings in Bioinformatics 2021).

    Enrichr is the most widely used implementation. It computes three numbers per term: the Fisher exact test p-value, a z-score for how far the term's Fisher rank deviates from the rank expected under random input gene lists, and a combined score that multiplies the log of the p-value by that z-score (Chen et al., 2013). The z-score correction exists precisely because the Fisher test assumes a binomial distribution and independent gene membership, which annotated gene sets violate. The 2016 update reported 180,184 annotated gene sets across 102 gene set libraries, and found the combined score and the z-score to be the best-performing of its methods when benchmarked against transcription-factor rankings (Kuleshov et al., Nucleic Acids Research 2016).

    The method's weak point is not the test. It is the denominator, and it is discussed in its own section below.

    GSEA: the whole ranked list, no threshold#

    GSEA removes the cut. Rank every measured gene by its correlation with the phenotype, then walk down the ranking, raising a running sum when you hit a member of the gene set and lowering it when you do not, with the step size tied to each gene's correlation. The enrichment score is the maximum deviation from zero reached during that walk (Subramanian et al., 2005).

    Two design decisions in that paper are worth understanding, because they are the reason GSEA behaves differently from a permutation-based competitor:

    • It permutes phenotype labels, not genes. The paper is explicit that permuting the labels preserves gene-gene correlations, which permuting genes does not. It runs 1,000 permutations to build the null distribution.
    • It normalises the score for set size to give the NES, and reports an FDR defined as the estimated probability that a set with a given NES is a false positive.

    The clearest demonstration of what the threshold-free design buys you is the diabetes example in the same paper. Oxidative phosphorylation genes were down an average of about 20% per gene in diabetic muscle — no individual gene dramatic enough to lead a cut list. GSEA called the set at P = 0.008 and FDR = 0.04; a standard overlap method on the same data gave P = 0.08 and FDR = 0.50. In the paper's lung cancer example, two independent patient cohorts (n = 62 and n = 86) shared only 12 genes between their top-100 single-gene lists, while each cohort's signature was strongly enriched in the other's ranking (NES 1.90 and 2.13, both P < 0.001).

    Practical parameters from the official GSEA user guide, which are worth copying rather than re-deriving: gene sets smaller than 15 or larger than 500 genes are ignored by default, tuned for datasets of roughly 10,000 to 20,000 features; 1,000 permutations is the recommendation; the report highlights sets at FDR below 25% as the ones most likely to generate interesting hypotheses, with a stricter cutoff such as 5% advised when you have few samples and fall back to gene-set permutation; and a reported nominal p-value of 0.0 means only that the true value is below 1 divided by the number of permutations.

    Note what that FDR < 25% convention means. It is a hypothesis-generation threshold published by the method's own authors, not a significance claim. The Nature Protocols pathway-analysis protocol is blunter, recommending Q < 0.05 or lower and calling Q < 0.25 very lenient (Reimand et al., Nature Protocols 2019).

    WGCNA: correlation structure, before any contrast#

    WGCNA is the odd one out, and the reason to know it is that it answers a question the other two cannot even accept as input: what co-varies in this cohort? There is no gene list, no threshold and no case-control contrast.

    The pipeline is a fixed sequence (Langfelder & Horvath, 2008): co-expression similarity is the absolute correlation between two genes' profiles; that similarity is raised to a soft-thresholding power β, chosen by an approximate scale-free topology criterion rather than by eye; similarity is converted to topological overlap; modules come out of hierarchical clustering of that overlap, with branches cut at constant height or by dynamic branch cut; and each module is summarised by its module eigengene, the first principal component of the module's expression matrix.

    The outputs that get reported are then all correlations:

    • Module membership — a gene's correlation with its module eigengene.
    • Eigengene significance — a module eigengene's correlation with a sample trait. In the paper's mouse liver example, the brown, red and salmon modules correlated with body weight at r = 0.59, 0.51 and 0.43.
    • Intramodular connectivity — how connected a gene is within its module, which is what "hub gene" means.

    PyWGCNA is the Python implementation and follows the same approach as the R package, differing "only in default parameter choices" (Rezaie et al., Bioinformatics 2023). What it adds is mostly downstream: GO, KEGG and REACTOME enrichment of modules through GSEApy, recovery of known and predicted protein interactions through STRING, comparison of modules between two networks by Jaccard similarity and Fisher exact test, and overlap tests between modules and single-cell cluster markers. On scale, the authors report comparable performance to the R package up to about 16,000 genes and roughly twice the speed beyond that, and report building modules for 96,000 transcripts on a network the R version could not complete within memory.

    Which null hypothesis are you rejecting?#

    This is the distinction that decides whether your p-value means anything, and it predates all three tools. A competitive null says the genes in your set are at most as often differentially expressed as the genes outside it. A

    self-contained null says no gene in your set is differentially expressed at all (Goeman & Bühlmann, Bioinformatics 2007). The self-contained null is more restrictive, so self-contained tests reject more sets; competitive testing is, in the authors' phrase, a zero-sum game, in which a set's significance is penalised by the significance of its complement.

    The practical consequence is about how you generate the null, not which hypothesis sounds better. Methods that compute significance by permuting genes treat genes as independent draws, an assumption Goeman and Bühlmann call "crucial and unrealistic". In their simulations, rejection rates were inflated at correlations as low as 0.2 to 0.3, and reached up to about 50,000 times the nominal level for high correlations and small α. Their recommendation is unambiguous: "We strongly recommend against the use of gene-sampling models in gene set testing."

    That is not a theoretical worry at the edge of the parameter space. In the CAMERA paper's simulation — 100 genes, mean inter-gene correlation of just 0.05, and no true differential expression anywhere — the false positive rates at a nominal 0.05 were (Wu & Smyth, Nucleic Acids Research 2012):

    TestRejection rate at nominal 0.05
    geneSetTest (moderated t)0.4157
    sigPathway (t)0.3880
    PAGE (logFC)0.3709
    CAMERA (moderated t)0.0477

    Eight times the nominal rate, from a correlation of 0.05. The authors' conclusion — "even a small inter-gene correlation dramatically increases the type I error rates to dangerous levels" — is the single most useful sentence in this literature, and the paper also shows that inter-gene correlation is non-ignorable even in homogeneous cell populations from genetically identical model organisms.

    This is why GSEA permutes phenotype labels, and why "I used GSEA" is not by itself an answer: if you ran it in a mode that permutes gene sets because you had too few samples for label permutation, you have changed which null you tested, and the method's own documentation tells you to tighten the FDR cutoff in exchange.

    What the benchmarks actually measured#

    The most systematic assessment available built a framework over a curated compendium of 75 expression datasets investigating 42 human diseases — 42 GEO microarray and 33 TCGA RNA-seq datasets — and ran 10 major enrichment methods against 323 KEGG and 4,631 GO-BP gene sets (Geistlinger et al., 2021). Findings worth carrying into your own analysis:

    • Self-contained methods are liberal on large sets. With shuffled labels, GLOBALTEST and SAMGS flagged essentially all random gene sets with more than 50 genes as significant. The effect was worse with KEGG sets, which tend to be larger than GO-BP sets.
    • Competitive methods were conservative, with the fraction of nominally significant sets roughly constant at 5-15% across datasets.
    • Competitive methods ranked phenotype-relevant sets systematically higher than self-contained methods (P = 1.87 × 10⁻¹⁹).
    • Runtime spans four orders of magnitude, from 7.7 seconds per dataset for CAMERA to 32.6 minutes for GSEA on the microarray compendium with GO-BP sets.
    • The authors' own guideline: plain gene lists → over-representation analysis; a full expression matrix under a competitive hypothesis → PADOG; a self-contained hypothesis → ROAST or GSVA.

    A second study attacked the sample-size question directly, running 13 methods over balanced replicate subsets (from 3 to 20 samples per group, ten replicates each) drawn from three GEO case-control datasets (Maleki et al., Human Genomics 2019). Its headline conclusion is that reproducible results with 3, 4 or 5 samples per group are unlikely for any of the methods studied. Beneath that: over-representation analysis and PAGE reported a consistent number of sets above 2×5, suggesting 5 per group as a floor for ORA; sample-permutation GSEA predicted no gene sets at all at small sizes and stabilised at around 15 sets from 2×10 upward, suggesting 10 per group as its floor. The same study ran a control-control experiment with no true differential expression and found ssGSEA calling nearly all gene sets significant at every sample size, while over-representation analysis, GSVA, ROAST and FRY rarely or never reported false positives.

    Read the ssGSEA result carefully before using single-sample scores as if they were a test. ssGSEA produces a per-sample score, and the control-control finding says that calling significance on those scores is not a well-behaved test of a group difference.

    The background set is where most published analyses fail#

    Over-representation analysis has a denominator, and the denominator is a scientific claim: the set of genes your experiment could have detected. Use the whole genome when you measured a targeted panel, filtered to expressed genes, or worked in a phosphoproteomics dataset, and your p-values inflate for a mechanical reason — the test believes your experiment had a chance to find genes it never assayed (Reimand et al., 2019).

    How often this goes wrong was measured. A survey of 186 open-access articles, yielding 235 analyses, found (Wijesooriya et al., 2022):

    • Only 8 of 197 over-representation analyses (4.1%) described an appropriate background.
    • Of the 221 analyses that ran a statistical test, 94 (about 43%) had no multiple-testing correction at all; only 119 (54%) described any.
    • Software version was reported in 68 of 235 analyses (29%); gene lists were provided for 93 (40%); code for 3 of 47 scripted analyses (6.4%).
    • Only 35 analyses (15%) were free of a major methodological issue.

    And the effect size of the background error, simulated across seven RNA-seq datasets: substituting a whole-genome background produced gene set results with a mean Jaccard index of 0.44 against the correct background. Combining the wrong background with no p-value adjustment dropped it below 0.38. The authors report the incorrect background as the more severe of the two errors for over-representation analysis.

    That is the honest ranking of what to spend care on: the background first, multiple-testing correction second, the choice of test third.

    One related trap on the interpretation side: gene set libraries are redundant, and redundancy dominates result tables. The MSigDB hallmark collection was built to address exactly this, condensing 8,380 gene sets from MSigDB v4.0 collections C1-C6 into 50 hallmark sets drawing on 4,022 of the originals (Liberzon et al., Cell Systems 2015). In that paper's glioblastoma example, the top 100 results across C1-C6 were largely driven by overlapping NF-κB, EMT and hypoxia/glycolysis signatures, pushing other relevant themes such as p53 further down, while 12 significant hallmarks recovered the same biological themes without the redundancy. A long list of significant terms that are all restatements of one theme is a presentation artifact, not more evidence.

    When to use each#

    SituationUseWhy
    RNA-seq differential expression with a rank for every genepre-ranked GSEAThreshold-free; it is the case the method was built for, and ranked tests are preferable when ranks are meaningful
    A coordinated small shift across a pathway, no gene passing your cutGSEAThe diabetes example: P = 0.008 vs P = 0.08 for an overlap method on the same data
    An unranked list — mutated genes, markers, a curated panelover-representation analysisThere is no rank to exploit; spend the effort on the background
    You need an answer in seconds across many gene listsover-representation analysisSeconds per list, and benchmark relevance indistinguishable from the best competitive method tested
    Fewer than about 5 samples per groupnone of them, as a significance claimReproducible results below 5 per group were unlikely for all 13 methods tested
    A cohort with no contrast you trust yetWGCNAIt takes no contrast; modules and module-trait correlations come out of the correlation structure
    Hub-gene or module-trait claims from fewer than 15 samplesnot WGCNAThe package authors do not recommend attempting it below 15 samples, and prefer 20
    Per-cell or per-sample gene set scoresssGSEA, reported as a scoreTreating single-sample scores as a group test was the worst false-positive case in the control-control benchmark
    Single-cell data, sparse countsnot WGCNAModule detection designed for sparse single-cell data is a different tool (see below)

    A reasonable default for a bulk RNA-seq two-group comparison: rank all genes by your differential expression statistic, run pre-ranked GSEA against a curated collection rather than everything at once, report NES with the FDR, collapse redundant terms into themes before writing, and run over-representation analysis on the thresholded list only as a cross-check with an explicit background. If the two disagree, the disagreement is usually informative: ORA sees large single-gene effects, GSEA sees coordination.

    Limitations to keep in view#

    • An enrichment p-value is a statement about an annotation database, not about biology. Change the library version and the result changes. Report the library and its version; one survey found the gene set library version reported in 18 of 235 analyses.
    • FDR assumes independent tests, and pathways are not independent. The Nature Protocols protocol says so directly, and still recommends FDR for filtering and hypothesis generation — which is the correct posture, not an endorsement.
    • Gene set size filters are not cosmetic. Very small sets inflate scores and very large sets break the normalisation; the GSEA default range of 15 to 500 exists for that reason, and published protocols narrow the upper bound further.
    • A module is not a pathway. WGCNA modules are defined by co-variation in your samples. Enriching a module against GO gives it a name; it does not make the module a curated pathway, and the module-trait correlation remains a correlation.
    • Batch structure becomes signal. The WGCNA FAQ recommends checking for batch effects and adjusting for them before building a network, for the obvious reason that a batch is a correlation structure.
    • None of these methods establish direction of causation, and a module eigengene correlated with a trait at r = 0.5 is not a mechanism.

    How to run it on .bloom*#

    Three tools cover the three methods, and they run as jobs rather than in the chat turn.

    gseapy_enrichment runs GSEApy, which implements the GSEA statistic itself plus pre-ranked GSEA, single-sample GSEA and over-representation analysis through Enrichr (Fang et al., Bioinformatics 2023). Its method parameter selects between them:

    1. prerank takes ranked_genes as a {gene: score} map — your differential expression statistic, one entry per measured gene. This is the mode to use for a bulk two-group RNA-seq contrast.
    2. enrichr takes gene_list and runs over-representation analysis. It is the same statistic as the direct Enrichr tool below, reached through GSEApy.
    3. ssgsea produces single-sample scores. Report them as scores; see the control-control benchmark above before testing them.
    4. gene_sets names the library (for example KEGG_2021_Human), and organism defaults to human. Expect 30 seconds to 5 minutes; no GPU.

    enrichr_enrichment calls Enrichr directly and returns, per term, the rank, the Fisher p-value, the adjusted p-value, the z-score, the combined score and the overlapping genes — so you can see which of your genes drove each term rather than only its score. It takes 2 to 500 gene symbols, enriches against up to five libraries (default: KEGG_2021_Human, GO_Biological_Process_2023, Reactome_2022), filters on the adjusted p-value at a cutoff you set (0.05 by default), and returns the top terms per library. It typically answers in 5 to 15 seconds. Enrichr is CC BY, from the Ma'ayan Lab, and the attribution rides along with the result.

    ⚠ Neither enrichment tool takes a custom background. The Enrichr path uses the gene set library as its universe, which is exactly the denominator question from the section above. If your background matters — a targeted panel, an expressed-gene filter, a proteomics assay — run GSEApy yourself with sandbox_python, where you control the background and the GMT file. Reporting a platform ORA result as though the background had been specified would be a claim the run does not support.

    pywgcna_network runs PyWGCNA on an expression matrix you supply by URL, with min_module_size (30 by default) controlling how small a module can be. Give it a trait_file and it returns module-trait associations alongside the modules and hub genes. Expect 5 to 30 minutes. The sample-size guidance from the R package's own FAQ applies unchanged: below 15 samples, the correlations the whole method rests on are too noisy to be worth clustering.

    Two neighbouring tools exist so you do not force the wrong one:

    • hotspot_modules is the module-detection tool for sparse single-cell data, where pywgcna_network is the wrong instrument.
    • aucell_score scores a gene set per cell, which is the single-cell analogue of ssGSEA — a score per cell, not a cohort-level test.

    A worked chain that goes from clustering to enrichment is in the single-cell DE and enrichment recipe, and scanpy is where the differential expression that feeds a pre-ranked GSEA comes from. If you are not sure which of the three fits the data you have, which tool? is the shorter route than guessing.

    Run the enrichment on your own ranked table on the .bloom* platform.

    Key Takeaways#

    • Pre-ranked GSEA when every gene has a meaningful rank; the threshold-free design is what finds a coordinated shift no single gene would lead (Subramanian et al., 2005).
    • Over-representation analysis when the list is unranked. It is fast, and its benchmark relevance was indistinguishable from the best competitive method tested (P = 0.85) (Geistlinger et al., 2021).
    • The background set is the error that matters. Only 4.1% of surveyed over-representation analyses described an appropriate one, and the wrong background was more damaging than skipping multiple-testing correction (Wijesooriya et al., 2022).
    • Inter-gene correlation breaks gene-permutation tests. A mean correlation of 0.05 with no real signal drove rejection rates to 0.42 at a nominal 0.05 (Wu & Smyth, 2012); permuting sample labels is the mitigation, which is what GSEA does.
    • Sample size is a hard floor, not a caveat. Below 5 samples per group, no method tested gave reproducible results (Maleki et al., 2019); WGCNA's own FAQ asks for 15 at minimum and prefers 20.
    • WGCNA answers a different question — what co-varies across a cohort — and names its modules only afterwards, through enrichment (Langfelder & Horvath, 2008).
    • On .bloom*: gseapy_enrichment, enrichr_enrichment and pywgcna_network, with the background caveat above.
    • Related reading: Scanpy vs Seurat for the upstream half of this workflow, and Rule Set 3 vs Rule Set 2 vs DeepSpCas9 for the same question asked of a score — what a method's training or null licenses you to claim.

    References#

    1. Subramanian, A., Tamayo, P., Mootha, V.K. et al. "Gene set enrichment analysis: A knowledge-based approach for interpreting genome-wide expression profiles." PNAS (2005). doi:10.1073/pnas.0506580102
    2. Chen, E.Y., Tan, C.M., Kou, Y. et al. "Enrichr: interactive and collaborative HTML5 gene list enrichment analysis tool." BMC Bioinformatics (2013). doi:10.1186/1471-2105-14-128
    3. Kuleshov, M.V., Jones, M.R., Rouillard, A.D. et al. "Enrichr: a comprehensive gene set enrichment analysis web server 2016 update." Nucleic Acids Research (2016). academic.oup.com/nar/article/44/W1/W90
    4. Langfelder, P., Horvath, S. "WGCNA: an R package for weighted correlation network analysis." BMC Bioinformatics (2008). doi:10.1186/1471-2105-9-559
    5. Rezaie, N., Reese, F., Mortazavi, A. "PyWGCNA: a Python package for weighted gene co-expression network analysis." Bioinformatics (2023). doi:10.1093/bioinformatics/btad415
    6. Fang, Z., Liu, X., Peltz, G. "GSEApy: a comprehensive package for performing gene set enrichment analysis in Python." Bioinformatics (2023). doi:10.1093/bioinformatics/btac757
    7. Geistlinger, L., Csaba, G., Santarelli, M. et al. "Toward a gold standard for benchmarking gene set enrichment analysis." Briefings in Bioinformatics (2021). academic.oup.com/bib/article/22/1/545
    8. Wijesooriya, K., Jadaan, S.A., Perera, K.L. et al. "Urgent need for consistent standards in functional enrichment analysis." PLOS Computational Biology (2022). doi:10.1371/journal.pcbi.1009935
    9. Wu, D., Smyth, G.K. "Camera: a competitive gene set test accounting for inter-gene correlation." Nucleic Acids Research (2012). academic.oup.com/nar/article/40/17/e133
    10. Goeman, J.J., Bühlmann, P. "Analyzing gene expression data in terms of gene sets: methodological issues." Bioinformatics (2007). academic.oup.com/bioinformatics/article/23/8/980
    11. Maleki, F., Ovens, K., McQuillan, I., Kusalik, A.J. "Size matters: how sample size affects the reproducibility and specificity of gene set analysis." Human Genomics (2019). doi:10.1186/s40246-019-0226-2
    12. Reimand, J., Isserlin, R., Voisin, V. et al. "Pathway enrichment analysis and visualization of omics data using g:Profiler, GSEA, Cytoscape and EnrichmentMap." Nature Protocols (2019). PMC6607905
    13. Liberzon, A., Birger, C., Thorvaldsdóttir, H. et al. "The Molecular Signatures Database Hallmark Gene Set Collection." Cell Systems (2015). PMC4707969
    14. GSEA User Guide, GSEA-MSigDB documentation. docs.gsea-msigdb.org/GSEA/GSEA_User_Guide
    15. WGCNA package FAQ (Langfelder & Horvath), mirrored documentation. WGCNA FAQ

    Frequently asked

    Should I use GSEA or over-representation analysis?

    Use over-representation analysis when all you have is an unranked list, such as mutated genes or a set of markers, and GSEA when your experiment produced a meaningful rank for every gene, such as an RNA-seq differential expression table. The Nature Protocols pathway-analysis protocol states the rule directly: ranked tests are preferable for experiments that produce meaningful ranks. The reason GSEA exists is the case where no gene clears a threshold: in the original paper, a set of oxidative phosphorylation genes was down an average of about 20% per gene in diabetic muscle, which GSEA called at P = 0.008 and FDR = 0.04 while a standard overlap method on the same data gave P = 0.08 and FDR = 0.50. A threshold-based method cannot see a coordinated small shift, because the shift never produces a cut list.

    Do I need a background gene list for over-representation analysis?

    Yes, and getting it wrong is the single most common error in published enrichment analysis. The background must be the set of genes your experiment could have detected, not the whole genome. A survey of 186 open-access articles found that only 8 of 197 over-representation analyses (4.1%) described an appropriate background, and its simulation on seven RNA-seq datasets found that substituting a whole-genome background produced results with a mean Jaccard index of 0.44 against the correct background. The same work reported the wrong background to be a more severe error than skipping multiple-testing correction entirely.

    How many samples do GSEA and WGCNA need?

    More than most studies have. A systematic study of 13 gene set analysis methods on replicate subsets of GEO datasets concluded that reproducible results with 3, 4 or 5 samples per group are unlikely for any of the methods tested, and suggested a lower bound around 10 per group for sample-permutation GSEA and around 5 per group for over-representation analysis. WGCNA is stricter again, because it estimates a correlation between every pair of genes across samples: the package FAQ states that the authors do not recommend attempting WGCNA on a dataset of fewer than 15 samples, and that one should have at least 20 if at all possible.

    Is WGCNA a pathway enrichment method?

    No, and that is the point of using it. WGCNA takes no contrast and no gene list. It correlates every gene with every other gene across your samples, raises those correlations to a soft-thresholding power, clusters the result into modules by topological overlap, and summarises each module by its first principal component, the module eigengene. Pathway names enter only afterwards, when you run enrichment on a module's gene membership. So WGCNA answers 'what co-varies in this cohort', and enrichment answers 'what is this list of genes called'. A module-trait correlation is a correlation across samples, not a differential expression test.

    Which of these methods run on .bloom*?

    All three. gseapy_enrichment runs GSEApy, which covers pre-ranked GSEA, single-sample GSEA and over-representation analysis through Enrichr; enrichr_enrichment calls Enrichr directly against up to five gene set libraries and returns the p-value, adjusted p-value, z-score, combined score and overlapping genes per term; pywgcna_network runs PyWGCNA on an expression matrix and returns modules, hub genes and, given a trait table, module-trait associations. Neither enrichment tool exposes a custom background parameter, so a controlled background means running GSEApy yourself in the sandbox with sandbox_python.


    tags

    • pathway enrichment
    • GSEA
    • over-representation analysis
    • WGCNA
    • Enrichr
    • RNA-seq

    about the author

    Ivy Biosciences

    The Ivy Biosciences team builds AI tools for computational drug discovery.

    Loading...