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.
- 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
- Machine learning foundationsLearn regularisation, class imbalance and metrics such as average precision, which suit rare regulatory elements.Learn it in Machine Learning
- 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
- Model interpretationUse attribution and motif discovery tools such as tangermeme to check that the model learned known biology, not a shortcut.
- 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
| Tool | What you use it for |
|---|---|
| gReLU | Train, interpret and apply deep learning models that predict regulatory signals from DNA sequence. |
| tangermeme | Run in silico mutagenesis, attributions and motif analysis on trained sequence models. |
| pyfaidx | Extract genome sequence for peak and background regions from FASTA files. |
| pyBigWig | Read signal tracks in bigWig format to build regression targets. |
| PyTorch | Build and train convolutional and attention models over one-hot DNA. |
Public data to practise on
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
- Deep Learning with PyTorchBuild neural representation and classification foundations.Syllabus available · lessons open as produced
- Practical Machine Learning in PythonUnderstand predictive nuisance models and overfitting.51 published lessons · more lessons in production
- Data Tools: NumPy, pandas, Matplotlib and scikit-learnPreserve sample identifiers and pipeline metadata.23 published lessons · all planned lessons open
- Statistics and Probability for Machine LearningBuild probability, inference and experimental-design foundations.41 published lessons · all planned lessons open
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.