Health and life sciences

Machine learning for regulatory genomics

Machine learning in regulatory genomics predicts transcription factor binding, chromatin accessibility and gene expression directly from DNA sequence. Trained models then score the effect of variants and reveal the sequence motifs that drive each signal.

How machine learning is used in regulatory genomics

Predicting protein binding from sequence

A convolutional network reads one-hot encoded DNA or RNA and predicts whether a given protein binds it. The learned filters can be read back as motifs, which connects the model to established biology.

Real exampleDeepBind (Alipanahi et al., 2015)Showed that deep learning can determine the sequence specificities of DNA- and RNA-binding proteins from experimental data, with specificities visualised as position weight matrices or a mutation map.

Scoring non-coding variants

Models trained to predict chromatin signals from sequence can be run on the reference and alternative allele of a variant, and the difference becomes a predicted regulatory effect. This gives a score for variants that change no protein.

Real exampleDeepSEA (Zhou and Troyanskaya, 2015)Learned a regulatory sequence code from large-scale chromatin-profiling data to predict chromatin effects of sequence alterations with single-nucleotide sensitivity, and used it to prioritise functional variants.

Predicting binding profiles at base resolution

Rather than a single label per region, these models predict the shape of the experimental signal along the sequence. Interpretation tools then extract motifs and the rules governing how they combine.

Real exampleBPNet (Avsec et al., 2021)Predicted base-resolution ChIP-nexus binding profiles of pluripotency transcription factors from DNA sequence and identified soft syntax rules for cooperative binding, validated with CRISPR-induced point mutations.

Predicting gene expression from long sequence context

Transformer models take a large window of DNA so that distant regulatory elements are in view, then predict expression and other signals across cell types. The same models score how a variant changes predicted expression.

Real exampleEnformer (Avsec et al., 2021)Integrated information from interactions up to 100 kb away to improve gene expression prediction from DNA sequence, giving more accurate variant effect predictions on expression.

Can you learn machine learning for regulatory genomics?

Yes, and the field is unusually open because the main models and datasets are public. Learn Python and genomic file formats first, then convolutional networks on one-hot encoded sequence, then interpretation and careful splitting. A genetics background helps but can be picked up alongside.

  1. Python and genomic file formatsRead FASTA with pyfaidx, read signal tracks with pyBigWig, and build arrays of sequence windows and labels.Learn it in Python
  2. Machine learning foundationsLearn regularisation, class imbalance and metrics such as average precision, which suit rare regulatory elements.Learn it in Machine Learning
  3. Convolutional networks on sequenceTrain a convolutional model on one-hot encoded DNA, then add dilated convolutions or attention for longer context.Learn it in Deep Learning
  4. Model interpretationUse attribution and motif discovery tools such as tangermeme to check that the model learned known biology, not a shortcut.
  5. Genomics backgroundLearn transcription, chromatin accessibility and what each assay actually measures, so the labels you train on mean something to you.

Moving into machine learning for regulatory genomics

If you already work in the field

Genomicists already know the assays, the genome builds and the artefacts in each track. Add Python and deep learning, then retrain a published architecture on data from your own laboratory and compare the motifs it recovers with the ones you expect.

If you come from data science or ML

Machine learning practitioners should learn what chromatin accessibility and ChIP data measure, why genome regions are correlated and why chromosome-level holdouts are the standard. Reproduce a published model on public data before building your own.

Roles that do this workComputational biologistBioinformatics scientistMachine learning scientist, genomicsResearch software engineer, genomics

Tools you will use

ToolWhat you use it for
gReLUTrain, interpret and apply deep learning models that predict regulatory signals from DNA sequence.
tangermemeRun in silico mutagenesis, attributions and motif analysis on trained sequence models.
pyfaidxExtract genome sequence for peak and background regions from FASTA files.
pyBigWigRead signal tracks in bigWig format to build regression targets.
PyTorchBuild and train convolutional and attention models over one-hot DNA.

Public data to practise on

  • ENCODE: Processed ChIP-seq, ATAC-seq and DNase-seq peaks and signal tracks across many cell types, for sequence-to-signal models.
  • JASPAR: Curated transcription factor binding motifs to compare against the motifs a trained model learns.

Your first project

Download a transcription factor ChIP-seq peak file from ENCODE, classify peak versus background sequences with a small convolutional network, and compare it with logistic regression on k-mer counts using AUPRC on a held-out chromosome.

Common questions

Why hold out whole chromosomes instead of random regions?

Nearby genomic regions share sequence and signal, so random splits put near-duplicates in both sets. Holding out whole chromosomes tests the model on sequence it has genuinely not seen.

Do you need a GPU for this work?

For small convolutional models on a few tracks, a single GPU is plenty and much of the work can start on a CPU. Long-context transformer models are usually used as pretrained models rather than trained from scratch.

Can these models say a variant causes a disease?

No. They predict molecular signals such as binding or expression, which is evidence to prioritise variants for study. Causal claims need genetic and experimental follow-up.

Where does the training data come from?

Public consortia releases of accessibility, ChIP and expression data, matched to a reference genome. The main work is building clean windows, labels and splits rather than finding data.

Courses for these skills

New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.