Genomics Demos

Interactive demos for DS 5080 Genomics Foundations for Data Science.

Vibe-coded with ❤️ by Stephen Turner.

Transmission and linkage

Recombination and gamete mosaics

Crossing over drawn against megabases and centimorgans at once. See why recombination fraction is not additive, and how ancestry blocks shrink generation by generation.

Lecture 081112

Linkage disequilibrium

Two loci, four haplotypes, and three measures of LD. D prime can be 1 while r squared is 0.05, and only r squared tells you whether a tag SNP will work.

Lecture 1112Lab 4

Genetic drift simulator

Wright-Fisher drift in a diploid population, with selection as an option. Seeded, so a run can be linked from a slide.

Lecture 13

Relatedness and IBD

Siblings share 50% on average and almost never exactly. Simulated meioses on all 22 autosomes, the shared segments drawn, and the distribution of sharing across hundreds of pairs.

Lecture 11Forensic genomics

Populations and ancestry

Hardy-Weinberg

The De Finetti diagram, the chi-square and exact tests, a sampling panel that shows what significance means, and the Wahlund effect: two populations in perfect equilibrium whose pooled sample fails.

Lecture 13Lab 1

PCA and ancestry

Principal component analysis on simulated genotypes. See what Fst, admixture, a cline and array ascertainment do to the plot, and how little variance the top axis explains.

Lecture 14Novembre teardown

Site frequency spectrum

Why most variants are rare, from a simulated coalescent. Place mutations on a genealogy, change the spectrum with a bottleneck or an expansion, and read Tajima's D off the picture.

Lecture 07

Working with genomic data

Genome coordinates and interval arithmetic

The same interval written both ways on the same picture. BED counts the gaps between bases from zero; VCF, GFF and GRanges count the bases from one. Plus every interval operation, with the R output beside it.

Lecture 09Lab 2Clinic 1

Variant consequence

Click a base, read the protein. Synonymous, missense, nonsense, frameshift and the GT-AG splice rule from the reading frame, with HGVS names, exon skipping and the 50-nucleotide NMD rule, on the real minus-strand TP53.

Lecture 0510Lab 3Lab 7

Read pileup

Depth is sampling. Look at the reads over one site, see the genotype likelihoods and the VCF record computed from them, then lower the coverage and lose a heterozygote.

Lecture 0406Lab 3

Assembly graph

A de Bruijn graph tangles when a repeat is longer than the reads that cover it. Build a small genome, sample reads, and change read length and k-mer size to see when the repeat resolves.

Lecture 04Nurk teardown

RNA-seq normalization

Counts to CPM, RPKM and TPM in an editable table. The gene with the most reads is not the most expressed gene, TPM sums to a million, and DESeq2 size factors ignore the gene that dominates the library.

RNA-seqLab 6

Association studies

GWAS bench

Simulate a study from its parameters and read the results. Manhattan, QQ with a concentration band, lambda, power, and the winner's curse. Add population structure and see what the correction costs.

Lecture 15171819Lab 4

Risk and polygenic scores

An odds ratio of 1.2 moves fewer than two people in a hundred. Icon arrays for absolute risk, the FTO effect in kilograms, a polygenic score under the liability model, and what a score keeps when it changes populations.

Lecture 2016Lab 7

Screening and PPV

A 99% test for a one-in-a-thousand condition is wrong nine times in ten when it says yes. Count the people, then apply the same arithmetic to a forensic database search.

Lecture 16Forensic genomicsLab 7