Help

The analyses explained

This help describes what each analysis shows, how MES.Plot calculates the values and how to read the result.

Contents

  1. Basics: input data and derived values
  2. Selection, order and significance threshold
  3. Shared encoding: colour and size
  4. Analyses Dot plot · Enrichment map · Gene-concept network · Term × gene heatmap · UpSet plot · Chord diagram · Enrichment volcano · Treemap · Venn diagram (comparison)
  5. Data check (report)
  6. Reproducibility
  7. Planned analyses (not yet available)

1. Basics: input data and derived values

What MES.Plot reads

MES.Plot reads the Enrichr table export (tab-separated text file, e.g. Reactome_Pathways_2024_table.txt). MES.Plot does not compute the enrichment itself – the statistics come from Enrichr. MES.Plot visualises them and checks them for inconsistencies.

Column Required Meaning (calculated by Enrichr)
Term yes Name of the pathway/gene set. A trailing Reactome ID (e.g. R-HSA-123456) is removed.
Overlap yes k/n: k genes of the input list are in the pathway, the pathway has n genes.
P-value yes Raw P-value of the enrichment test (Enrichr: Fisher's exact test).
Adjusted P-value yes P-value corrected for multiple testing (Enrichr: Benjamini–Hochberg over all terms of the library).
Odds Ratio no How strongly the pathway is enriched compared to chance (> 1 = enriched). Only needed for the volcano.
Combined Score no Enrichr score combining the P-value and the deviation from the expected rank. MES.Plot only uses it for sorting.
Genes no The k overlapping genes, separated by ;. Needed for network, heatmap, UpSet, chord and enrichment map.

Rows that cannot be read (no term name, overlap not in the format k/n, P-value not a number) are skipped and reported with their row number in the data check. Numbers are always read with a decimal point; a decimal comma (typical after saving in Excel) counts as an error.

Derived values

Value Formula Used for
Gene count k (numerator of Overlap) dot and node size, treemap area
Gene ratio k / n (overlap ÷ pathway size) x-axis of the dot plot
−log₁₀(adj. P) −log₁₀(max(adj. P, 10⁻³⁰⁰)) colour in almost all analyses
Gene list Genes split, duplicates removed (case-insensitive) all gene-based analyses

Note on the term "gene ratio": MES.Plot uses overlap ÷ pathway size (the fraction of the pathway that was hit). clusterProfiler (R), in contrast, calls overlap ÷ size of the input list "GeneRatio". Keep this in mind when comparing with figures from other software and in the methods section.

The lower bound of 10⁻³⁰⁰ prevents an adjusted P of exactly 0 from producing an infinite value.

Important: gene lists only contain the overlapping genes

For each term Enrichr exports only the genes that are in the input list and in the pathway – not all genes of the pathway. All gene-based analyses (Jaccard index, intersections, networks) therefore refer to your genes in each pathway, not to the complete pathway definition.


2. Selection, order and significance threshold

Which terms are shown. Every analysis (except volcano and Venn, see there) shows only the ticked terms of the table. When a file is loaded and with Top N by adj. P, the N terms with the smallest adjusted P are selected (ties: smaller raw P-value, then order in the file; default N = 10). Ticks can be set freely.

In which order. The order in the figure (e.g. top to bottom in the dot plot) is the sort order of the table: by adj. P, P, gene ratio, gene count, combined score, odds ratio, name or file order, ascending or descending. Ties are broken by the position in the file.

Significance threshold (Threshold adj. P <, default 0.05). A term counts as significant if adj. P < threshold. The threshold affects:

  • the colour marking, the counter and the filter in the table,
  • the option Significant terms in bold (term names in bold),
  • the threshold line in the volcano,
  • the sets in the Venn diagram,
  • the summary "Significant terms" in the data check.

The threshold does not filter: non-significant terms are drawn if they are ticked. The colour shows how significant they are.


3. Shared encoding: colour and size

Colour = −log₁₀(adj. P)

  • Higher value = smaller adjusted P = more significant. −log₁₀ = 1.3 corresponds to adj. P = 0.05; 2 to 0.01; 3 to 0.001.
  • The colour scale runs from the smallest to the largest value of the terms shown (volcano: of all points shown). It is therefore relative: the same colour does not mean the same P-value in two figures – always read the colour legend. If all terms have the same value, the scale is widened by ±0.5.
  • Colour maps: Viridis (purple = weak → yellow = strong; colour-blind safe, also readable in greyscale, recommended) or green–yellow–red (green = weak → red = strong; not suitable for red–green colour blindness). Colours are interpolated linearly between the colour stops.

Size = gene count

  • Dot and node sizes are area-proportional: the circle area grows linearly with k between the smallest and the largest k of the terms shown (radius ∝ √). Twice the overlap therefore gives (approximately) twice the area, not twice the diameter.
  • The size scale is also relative to the terms shown.
  • The size legend shows the minimum, the maximum and a rounded middle value (geometric mean).

Tooltips

Every data mark has a tooltip (also in the SVG export) with term, overlap, gene ratio, P, adj. P, −log₁₀(adj. P) and the row number in the file – so every point can be traced back to the original data.


4.1 Dot plot

Question: Which pathways are enriched, how strongly, and what fraction of each pathway is affected?

Layout

Element Meaning
y-axis one term per row, order = table sort order
x-axis gene ratio = k / n, starts at 0
dot size gene count k
dot colour −log₁₀(adj. P)
guide line grey line from the axis to the dot (can be switched off)

Reading: Far right = a large part of the pathway was hit. Large dot = many genes. Light/yellow colour (Viridis) = highly significant. Small pathways easily reach a high gene ratio with few genes – so always read size and colour too.

Options: Guide lines to the dots, x-axis title, Wrap after characters, Significant terms in bold.


4.2 Enrichment map

Question: Which pathways are linked by shared genes and form thematic clusters?

Calculation

  1. For every pair of selected terms A, B the Jaccard index of their gene lists is calculated: J = |A ∩ B| / |A ∪ B| (0 = no shared genes, 1 = identical gene lists).
  2. An edge is drawn if J > 0 and J ≥ Edge from Jaccard index (default 0.2).
  3. Positions come from a force-directed layout (Fruchterman–Reingold with a pull towards the centre): all nodes repel each other, edges attract in proportion to J. It starts on a fixed spiral and runs 500 steps (300 from 80 nodes), without random numbers – the same selection always gives the same picture.
  4. The positions are stretched to fill the drawing area (width and height independently).
Element Meaning
node a term; size = gene count, colour = −log₁₀(adj. P)
edge shared genes; line width = 0.4 pt + 3 pt × J
distance qualitative only: connected terms lie close together

Reading: Densely connected groups are pathways that hit essentially the same genes – often one biological process that appears several times in the library. Isolated nodes share no genes (above the threshold). The absolute position and the axes have no meaning.

Options: Edge from Jaccard index (higher = fewer, stronger edges). Limit: at most 300 terms.


4.3 Gene-concept network (cnetplot)

Question: Which genes drive the enrichment, and which genes link several pathways?

Calculation

  • Bipartite network: pathway nodes and gene nodes. Each edge = "gene is in the overlap of this term".
  • Only genes occurring in at least N of the selected terms are shown (option Genes in at least N terms; 1 = all genes, 2 = only genes that connect several terms; web-app default: 2).
  • Layout as in the enrichment map (force-directed, deterministic); pathway nodes repel twice as strongly so that they spread out and the genes lie between them.
  • Adjustable appearance: Line width (pt) of the links (default 0.5), Gene labels as a percentage of the font size (default 80 %) and Gene names in bold.
Element Meaning
large circle term; size = gene count, colour = −log₁₀(adj. P)
small grey circle gene (labelled in italics)
line gene belongs to the overlap of the term

Reading: Genes between several pathways are shared drivers (often key genes or hubs). Genes on the edge belong to one pathway only. With N = 2 (default) only the connecting genes remain; with N = 1 you see all overlap genes.

Limit: at most 400 nodes (terms + genes); otherwise increase N or select fewer terms.


4.4 Term × gene heatmap

Question: Which gene is in which pathway – complete and without overlapping lines?

Calculation

  • Rows = selected terms (table order), columns = genes (filtered with Genes in at least N terms, default 2 – set to 1 for all genes).
  • A cell is filled if the gene is in the overlap of the term; otherwise light grey ("not in term").
  • The fill colour is the colour of the term (−log₁₀ adj. P) – the cell does not carry a value of its own (no expression data).
  • Column order: by the first term containing the gene; then genes in many terms before genes in few; then alphabetically. This produces blocks running from top left to bottom right.

Reading: Vertical lines of filled cells = genes in many pathways. Rows with a similar pattern = pathways with similar genes (compare the enrichment map).

Limit: With very many genes, cells and font become smaller; below about 2.5 pt per cell MES.Plot stops with a message (increase N or widen the figure).


4.5 UpSet plot

Question: How many genes are shared by exactly which combination of pathways?

Calculation

  • Each gene is assigned to exactly one combination: the set of all selected terms whose overlap contains it (exclusive intersections). A gene in A and B therefore counts only for "A + B", not additionally for "only A".
  • The sum of all intersection bars = the number of distinct genes.
  • Order: largest intersection first; for ties, fewer participating terms first, then by the first term.
  • At most Max. intersections (default 20) are shown; smaller combinations are omitted.
  • The filter Genes in at least N terms does not apply here – the set sizes would otherwise be wrong.
Element Meaning
bars at the top size of the exclusive intersection (number above)
matrix filled, connected dots = participating terms
bars on the left ("Set size") total number of distinct genes of the term; colour = −log₁₀(adj. P)

Reading: A large bar with a single dot = many genes only this pathway contains. Bars with many dots = core genes shared by several pathways. The tooltip lists the genes of the intersection.

Limit: at most 30 terms. Better than a Venn diagram from about 4 sets.


4.6 Chord diagram

Question: How are the genes distributed across the pathways – compact and at a glance?

Calculation

  • Left half of the circle: terms (numbered, legend on the right); right half: genes (filtered with Genes in at least N terms, default 2 – set to 1 for all genes).
  • Each ribbon connects a term with one of its genes – one ribbon per pair "gene is in term".
  • The arc length of a term is proportional to the number of its (shown) genes, the arc length of a gene to the number of terms containing it. Both halves have the same total.
  • Ribbons have the colour of their term (−log₁₀ adj. P); their order is chosen to minimise crossings.
  • Terms without shown genes appear grey in the legend and have no arc.

Reading: Wide gene arcs with many ribbons = genes in many pathways. The number at an arc leads to the legend.


4.7 Enrichment volcano

Question: How do effect size and significance behave across all terms of the file, and where are the selected ones?

Calculation

  • All terms of the file with a valid odds ratio (> 0) and P-value (> 0) are drawn – not only the ticked ones.
  • x = log₂(odds ratio): 0 = no enrichment, 1 = twice as frequent as expected.
  • y = −log₁₀(raw P-value).
  • Colour = −log₁₀(adj. P), size = gene count.
  • Vertical dashed line at odds ratio = 1 (log₂ = 0).
  • Horizontal dashed line "adj. P < threshold": at the largest raw P-value that is still significant after correction. Everything above it is significant. (This makes the Benjamini–Hochberg boundary visible on the raw-P axis.)
  • The ticked terms have a black outline, are drawn on top and – option Label selected terms – are labelled on the right with a line to the dot.

Reading: Top right = strong and significant enrichment. Far right but low = large odds ratio but too few genes for significance (typical for very small pathways).

Requirement: column Odds Ratio. Terms without a valid odds ratio are missing (see data check).


4.8 Treemap (Reactome hierarchy)

Question: Which broad biological areas do the enriched pathways belong to?

Calculation

  1. Each selected term is matched to a human Reactome pathway (R-HSA-…) by its name. Matching ignores case and treats special characters as spaces (Enrichr removes e.g. the slash in "PI3K/AKT").
  2. From there MES.Plot walks up the Reactome hierarchy to the top-level category (e.g. "Signal Transduction", "Immune System"). If a pathway has several top-level categories, the alphabetically first one is used.
  3. Terms that cannot be matched go into the group "Not assigned".
  4. Areas follow the squarified treemap algorithm (Bruls, Huizing & van Wijk 2000): group area = sum of the gene counts of its terms, tile area = gene count (at least 1). Largest groups and tiles first.
Element Meaning
dark frame with title Reactome top-level category
tile term; area = gene count, colour = −log₁₀(adj. P)

Reading: Large groups = many overlapping genes in this area. The area shows the amount of genes, not the significance – read the colour for that.

Requirement: the Reactome files ReactomePathways.txt and ReactomePathwaysRelation.txt (reactome.org). Only meaningful with Reactome libraries; with other libraries almost everything ends up in "Not assigned". Library version and hierarchy version should match, otherwise renamed pathways are missing.


4.9 Venn diagram (comparing several files)

Question: Which pathways are significant under which conditions – e.g. up- vs. down-regulated genes, or two time points?

Calculation

  1. For each ticked file (2 or 3) the set of significant terms is formed: adj. P < threshold. The ticks in the term table play no role here.
  2. Terms are matched by name (case-insensitive, repeated spaces normalised). If a term occurs twice in a file, the smaller adjusted P counts.
  3. Each term falls into exactly one region: the combination of files in which it is significant (e.g. "only up" or "up ∩ down (not late)"). The numbers are therefore exclusive and add up to the number of terms that are significant in at least one file.
  4. "n = …" below the file name = all significant terms of that file.
Element Meaning
circle one file (Okabe–Ito colours, colour-blind safe)
number in a region terms significant in exactly these files (centre in bold)

Important: The circles are equal in size and not area-proportional – the numbers carry the information. The Comparison tab lists the terms of each region, sorted by the smallest adjusted P, and can be saved as CSV.

Limits: "Not significant" does not mean "not enriched" – a term just above the threshold drops out of the set. For more than three files an UpSet-style comparison is better suited. The files should be produced with the same library, otherwise the term names will not match.


5. Data check (report)

When loading, MES.Plot checks every file. Each message has a level – Error (data are wrong or missing from the figures), Warning (probably a problem), Note, OK – and, where possible, the row number as in a text editor. At most 15 affected rows are listed per check. The report can be saved as text.

Check Rule Level
Columns Required columns missing → file is rejected. Without Genes or Odds Ratio the dependent analyses are not available. Error / Warning / Note
Reading How many data rows were read or skipped; with a hint if Excel turned the overlap into a date or wrote a decimal comma. Error
Overlap k/n 1 ≤ k ≤ n Error
Overlap = number of genes k = number of entries in Genes Error
Duplicate genes in term a gene listed more than once in the same row Warning
P-values between 0 and 1 0 ≤ P ≤ 1 and 0 ≤ adj. P ≤ 1 Error
adj. P ≥ P No correction can make a P-value smaller. Error
Benjamini–Hochberg adj. P is recalculated (see below) and compared with the file. Warning
Duplicate terms term name occurs more than once Warning
Excel date values gene symbols such as 1-Mar, 7-Sep, 01.03. (from MARCH1, SEPT7 …) Error
Gene symbol is a number e.g. 1E5 Warning
Gene symbol case more than half of the symbols contain lower-case letters → probably mouse/rat in a human library Warning
Odds ratio positive, finite number Warning
Significant terms number with adj. P < threshold; 0 → the figures only show trends Note / Warning

How Benjamini–Hochberg is recalculated

For m terms with P-values sorted ascending p₍₁₎ ≤ … ≤ p₍ₘ₎:

adj p(i) = min( 1, min over j ≥ i of ( p(j) · m / j ) )

This is the standard procedure (as p.adjust(p, "BH") in R). A value counts as matching if it deviates by at most 10⁻⁶ times the value (rounding in the file). Differences typically arise when the file was filtered or truncated (then m is wrong), rows could not be read, another procedure was used or values were edited by hand. For the figures MES.Plot always uses the adjusted P from the file, not the recalculated one.


6. Reproducibility

  • Deterministic: The same file with the same settings and the same selection always gives the same figure – the network layouts use no random numbers either.
  • Saved figures store the analysis, all settings and the selected terms, not an image; they are recalculated from the unchanged original file when opened.
  • Traceable: Every tooltip names the row of the original file.
  • Font: Text is measured with the character widths of Arial so that the layout is identical on every machine.

7. Planned analyses (not yet available)

These analyses do not exist in MES.Plot yet. They are described here so that domain experts and developers share the same idea of what they would show and how they would be calculated. Only analyses that need no new data sources are included: they use the same Enrichr tables and build on existing code. Effort: low = new layout from existing building blocks, about 1–2 days; low to medium = plus a small new calculation, about 3–5 days (each including tests, help text and website text in both languages).

Analysis Question Effort
Bar chart Which terms are most significant? low
Lollipop plot like the dot plot, with significance on the axis low
Gene frequency Which genes occur in the most pathways? low
Dot plot by Reactome category Which terms belong to which area? low
UpSet across files comparison like Venn, for 4–6 files low
Comparison dot plot How do the same terms behave in several files? low to medium
Term similarity heatmap Which terms are redundant? low to medium

7.1 Bar chart (planned)

Question: Which terms are most significant? The simplest form, expected by many journals.

Calculation and encoding

  • One horizontal bar per selected term, order = table sort order.
  • Bar length = −log₁₀(adj. P) (alternatively combined score or gene count).
  • Bar colour = gene ratio or uniform; dashed vertical line at −log₁₀(threshold), e.g. 1.3 for 0.05.
  • Gene count optionally as a number at the end of the bar.

Reading: The longer, the more significant. Bars left of the threshold line are not significant.

Limit: essentially shows a single quantity – use the dot plot for more information.

7.2 Lollipop plot (planned)

Question: like the dot plot, but with significance as position instead of colour – so it can be read more precisely.

Calculation and encoding

  • y = term, x = −log₁₀(adj. P), line from 0 to the dot.
  • Dot size = gene count, dot colour = gene ratio (own colour scale).
  • Vertical threshold line at −log₁₀(threshold).

Reading: position = significance (exactly readable), size = number of genes.

7.3 Gene frequency (planned)

Question: Which genes occur in the most selected pathways (hub genes)?

Calculation and encoding

  • For each gene, count in how many selected terms it is part of the overlap.
  • Horizontal bars, sorted descending; the N most frequent genes (option, e.g. default 30).
  • Bar colour uniform or by the strongest −log₁₀(adj. P) of the terms containing the gene.
  • Tooltip: the terms of the gene.

Reading: Genes at the top are candidates for central drivers. Caution: genes in many large, related pathways (e.g. signalling pathways with many sub-pathways) are counted several times – read together with the enrichment map.

7.4 Dot plot by Reactome category (planned)

Question: Which enriched terms belong to which biological area – with the precision of the dot plot?

Calculation and encoding

  • Like the dot plot, but terms are grouped by their Reactome top-level category (matching as in the treemap), with a group heading and separator line.
  • Within a group the table sort order applies; groups are ordered by their best adjusted P.
  • Terms that cannot be matched go into "Not assigned" at the end.

Limit: needs the Reactome files; only meaningful for Reactome libraries.

7.5 UpSet across files (planned)

Question: like the Venn diagram, but for 4–6 files, where Venn diagrams become unreadable.

Calculation: exactly as for the Venn diagram (significant terms per file, exclusive regions). Each non-empty region becomes a bar; the matrix shows the participating files, the bars on the left the number of significant terms per file. Order and Max. intersections as in the UpSet plot.

Reading: like the UpSet plot, except that the sets are files and the elements are terms (instead of terms and genes).

7.6 Comparison dot plot (planned)

Question: How do the same pathways behave under several conditions (2–6 files of a project) – not just "significant yes/no" as in the Venn diagram, but with values? (Corresponds to compareCluster in clusterProfiler.)

Calculation

  1. Rows = terms that are significant in at least one of the ticked files (adj. P < threshold); optionally limited to the top N per file.
  2. Columns = files (order and labels as in the file list).
  3. Terms are matched by name as in the Venn diagram.
  4. Row order: grouped by pattern (e.g. first "significant in all", then "only in file 1" …), within a group by the best adjusted P.
Element Meaning
dot term in this file; size = gene ratio (or gene count), colour = −log₁₀(adj. P)
filled / outline only significant in this file / present but not significant
empty term does not occur in the file

Important: here the colour scale is shared by all files so that the columns are comparable.

Reading: rows with dots in all columns = shared pathways; single dots = condition-specific. Unlike the Venn diagram, terms just above the threshold are visible too (outline).

7.7 Term similarity heatmap (planned)

Question: Which selected terms are redundant because they contain almost the same genes? Complements the enrichment map with exact values and a fixed arrangement.

Calculation

  1. For every pair of selected terms the Jaccard index of the gene lists (as in the enrichment map).
  2. Optional hierarchical clustering of the terms (distance = 1 − J, average linkage) so that similar terms sit next to each other; otherwise table order.
  3. Symmetric matrix terms × terms; diagonal = 1.

Encoding: cell colour = Jaccard index (own scale 0–1), optionally the value in the cell; next to the term names a narrow colour strip with −log₁₀(adj. P); optionally the tree (dendrogram) at the edge.

Reading: strong blocks along the diagonal = groups of redundant terms; from each group the most significant term is often enough for the main figure.

Limit: useful up to about 60 terms.