6.4.11Bioinformatics & Computational Biology

Explain data visualization in genomics

1,948 words9 min readdifficulty · medium1 backlinks

WHAT is genomic data visualization?

The core idea is the visual encoding: each piece of data is assigned to a channel the eye reads well.

Data type Best visual channel Example plot
Genomic position horizontal position (x-axis coordinate) genome browser track
Read count / coverage height (bar length) coverage histogram
Expression value color intensity heatmap
Sample similarity 2D distance PCA/clustering
Genome-wide signal angle around a circle Circos plot

WHY do we need it? (the 80/20 core)

The 20% that gives 80% of the value: three "workhorse" plot families.

  1. Genome browser tracks — answer "where on the chromosome?"
  2. Heatmaps + clustering — answer "which genes/samples behave alike?"
  3. Manhattan & volcano plots — answer "which points are statistically significant?"

If you master these three, you can read most genomics papers.


HOW each plot works (derived from what it must show)

1. Genome browser track

  • Coverage track: at each base position pp, height = number of reads covering it, C(p)=r1[r overlaps p]C(p) = \sum_r \mathbb{1}[r \text{ overlaps } p].
  • Gene track: boxes (exons) joined by thin lines (introns).
  • Variant track: tick marks at SNP positions.

2. Heatmap (the color-matrix)

Deriving the standard preprocessing — the Z-score. Raw expression values span huge ranges (housekeeping genes >> rare genes), so their color would swamp everything. We want each gene compared to its own baseline. For gene ii across samples:

zij=xijμiσiz_{ij} = \frac{x_{ij} - \mu_i}{\sigma_i}

  • Why subtract μi\mu_i? To center each gene at 0 → color = "above or below this gene's average."
  • Why divide by σi\sigma_i? To make genes with different variability comparable → a value of +2+2 means "2 SDs high" for every gene.

μi=1nj=1nxij,σi=1nj=1n(xijμi)2\mu_i = \frac{1}{n}\sum_{j=1}^n x_{ij}, \qquad \sigma_i = \sqrt{\frac{1}{n}\sum_{j=1}^n (x_{ij}-\mu_i)^2}

Then rows and columns are reordered by hierarchical clustering so similar profiles sit adjacent, making blocks of co-regulated genes visible.

3. Volcano plot (deriving the axes)

  • x-axis: magnitude of change = log2(fold change)\log_2(\text{fold change}). Why log? So a doubling (×2\times 2) and a halving (×12\times \tfrac12) are symmetric: log22=+1\log_2 2 = +1, log212=1\log_2 \tfrac12 = -1.
  • y-axis: confidence = log10(p-value)-\log_{10}(p\text{-value}). Why log10-\log_{10}? Because tiny p-values (10810^{-8}) become large heights (88) — significant genes fly to the top.

x=log2 ⁣exprtreatexprcontrol,y=log10(p)x = \log_2\!\frac{\text{expr}_{\text{treat}}}{\text{expr}_{\text{control}}}, \qquad y = -\log_{10}(p)

The two "wings" high up = genes that are both strongly and significantly changed.

4. Manhattan plot (GWAS)

Same y=log10(p)y = -\log_{10}(p) trick, but x = genomic position across all chromosomes. Tall "skyscrapers" = loci associated with a trait.

Figure — Explain data visualization in genomics

Worked examples


Common mistakes


Recall Feynman: explain to a 12-year-old

Imagine you have a giant spreadsheet with a million numbers about your body's genes. Reading it number by number is impossible. So instead you paint it: each number becomes a color, hot for big and cold for small. Now the spreadsheet looks like a picture, and your eyes instantly spot the red splotches — the "interesting" genes. Other tricks put dots on a map of your DNA (where things happen) or plot dots so the truly important ones jump to the top of the screen. Visualization = turning boring numbers into pictures your eyes can read.


Recall flashcards

Why do heatmaps often use Z-scores instead of raw expression?
To center each gene at its own mean and scale by its own SD, so all genes are comparable and one high-expression gene doesn't dominate the color.
What does the x-axis of a volcano plot represent and why is it log?
log2\log_2 fold change; log makes doubling (+1) and halving (−1) symmetric around 0.
What does the y-axis of both volcano and Manhattan plots show?
log10(p-value)-\log_{10}(p\text{-value}) — small p-values become large heights, so significant points rise up.
Which visual channel does the human eye read most accurately?
Position, followed by length, then (least accurately) color.
In a genome browser, what does a coverage track plot?
Number of reads overlapping each base position along the x-axis coordinate.
Why avoid rainbow color scales?
They are not perceptually uniform (equal steps look unequal, create false edges) and are bad for color-blind viewers.
What are the "interesting" genes on a volcano plot?
Those far from x=0 (large change) AND high on y (significant) — the two top corners.
Formula for Z-score of gene ii, sample jj?
zij=(xijμi)/σiz_{ij}=(x_{ij}-\mu_i)/\sigma_i.

Connections

  • RNA-seq analysis — produces the expression matrices that become heatmaps.
  • GWAS — the source of Manhattan plots.
  • Hierarchical clustering — reorders heatmap rows/columns.
  • Principal Component Analysis — 2D visualization of sample similarity.
  • Log transformations — why log2\log_2 and log10-\log_{10} axes work.
  • Genome browsers (IGV, UCSC) — track-based visualization tools.
  • Multiple testing correction — sets the significance line on Manhattan/volcano plots.

Concept Map

motivates

maps

assigns data to

most accurate

next

least accurate

core workhorses

where on chromosome

which behave alike

which are significant

uses x-axis

needs preprocessing

uses color scale

Genomic data too big

Data visualization

Visual encoding

Visual channels

Position

Length

Color

Three plot families

Genome browser tracks

Heatmap plus clustering

Manhattan and volcano

Z-score normalization

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, genomics me data itna bada hota hai ki raw numbers dekh ke kuch samajh nahi aata — 3 billion bases, hazaaron genes. Insaan ki aankh numbers padhne me kamzor hai, par patterns pakadne me expert hai. Isliye hum data visualization karte hain: har number ko ek visual channel — position, length ya color — me convert kar dete hain, taaki dimaag turant pattern dekh le.

Teen main plots yaad rakh lo (yeh 80/20 hai). Heatmap: matrix ke har cell ko color de dete hain, aur Z-score lete hain taaki har gene apne khud ke average se compare ho — red matlab us gene ke mean se upar, blue matlab neeche. Volcano plot: x-axis pe log2\log_2 fold change (kitna change hua) aur y-axis pe log10(p)-\log_{10}(p) (kitna confident hai). Jo genes dono corner me upar hain, wahi asli interesting hain. Manhattan plot: GWAS me, x-axis pe genome position aur y-axis pe wahi log10(p)-\log_{10}(p) — jo tower jaisi tall spikes dikhti hain, wahi trait se juda locus hai.

Ek important baat: aankh position ko sabse accurately padhti hai, phir length, aur color sabse kam accurate. Isliye exact important data hamesha position pe dalo, color sirf broad pattern ke liye. Aur galti mat karna — heatmap me red ka matlab "absolute high" nahi hota, balki "us gene ke apne average se high" hota hai. Hamesha color-scale legend padho. Rainbow colors avoid karo kyunki wo perceptually uneven hote hain aur color-blind logon ke liye problem karte hain.

Yeh isliye matter karta hai kyunki ek achhi picture ek research paper ka pura result ek nazar me bata deti hai — kaunse genes co-regulated hain, kaunsa mutation disease se juda hai, kahaan coverage kam hua. Numbers ki jagah pictures = fast, sahi biological insight.

Test yourself — Bioinformatics & Computational Biology

Connections