"A Figure Worth a Thousand Tables" — Building Publication-Ready Heatmaps with Genesets

 The grant deadline is in three weeks. Your collaborator has just asked for "a figure showing the expression of those immune genes across the cohort." Your PI wants it colour-coded by subtype, with hierarchical clustering, looking "like the ones in that Nature paper."

You open R2.

The Genesets and Heatmaps module is where R2 shifts from analytical tool to presentation machine — and the quality of what it produces is genuinely publication-ready without any post-processing in Illustrator.

The starting point is your gene list. Maybe it's a set of immune checkpoint genes you've curated from the literature. Maybe it's the output of your differential expression analysis from earlier in the week. Maybe it's a published signature from a paper your PI circled in red pen. In R2, you save this list as a geneset, and from that point it becomes a reusable object — available for heatmaps, signature scoring, pathway analyses, and more.

To build the heatmap, you select your dataset, specify your geneset, and choose how to sort both axes. You can order samples by a clinical track — tumour subtype on the horizontal axis turns the heatmap into a visual comparison of those groups. You can order genes by expression pattern, letting the data itself decide which genes behave similarly and should sit next to each other.

For the most hypothesis-free version of the analysis, R2 offers unsupervised hierarchical clustering: both genes and samples are sorted purely by their expression similarities, with no clinical labels imposed. What emerges from this process is sometimes the most compelling panel in a paper — the moment where the data groups itself, and the clinical tracks you overlay on top align with those groupings in a way that feels almost eerily inevitable.

Multiple genesets can be combined in a single heatmap, separated by coloured dividers, so you can visually compare the behaviour of — say — an immune activation signature against an immune suppression signature, side by side, across the same patient cohort.

The colour scale, font sizes, annotation bars and other aesthetic details are all adjustable within R2 itself. When you're done, you export the image directly. No R script, no Python, no graphic designer required.

Three weeks before the grant deadline. The figure is done by lunchtime.

This is Part of an ongoing series on the R2 Genomics Analysis and Visualization Platform, developed at Amsterdam UMC. All analyses can be freely performed at r2.amc.nl. Full tutorials at r2-tutorials.readthedocs.io.

Comments

Popular posts from this blog

Plotting updates for the open online R2platform. The data science platform for biomedical researchers

R2: An Interactive Online Portal for Tumor Subgroup Gene Expression and Survival Analyses, Intended for Biomedical Researchers