Skip to content

Models over biological sequences

DNA, RNA and protein — alignment, variant calling, embeddings and what a protein language model is actually trained on.

A biological sequence is a string over a four-letter or twenty-letter alphabet, which makes it look like the easiest possible input for a model. It is not, and the reason is that the interesting structure is almost never local. Two proteins can share eight percent of their residues and fold into the same shape; two stretches of DNA a hundred kilobases apart can control each other; a single base substitution can matter enormously or not at all depending on where in a codon it lands. The methods in this cluster are all, in one way or another, attempts to make that long-range structure computable.

These pages work the mechanism rather than the vocabulary. Where an algorithm has a recursion, the recursion is written out and run on a short example; where a score has a definition, the definition is given with the quantities it depends on named. Several of these methods sit close to clinical and therapeutic work, and every one of those pages says where the computation stops and where laboratory validation, expert interpretation or regulatory approval begins.

DNA Sequence Classification With Machine Learning

How k-mer frequency turns a variable-length DNA string into a fixed-length feature vector, worked on a short sequence, and what that representation throws away.

9 min read

Protein Language Models Explained

What a masked-residue model is trained on, what its per-residue embeddings encode, and why that is a different thing from predicting a structure.

10 min read

RNA Secondary Structure Prediction Explained

How base-pair energy minimisation folds an RNA sequence, worked as a recursion on a short hairpin, and why the minimum-energy structure is only one answer.

10 min read

Sequence Alignment Algorithms: How BLAST Actually Searches

The dynamic-programming alignment BLAST avoids running, the seed-and-extend heuristic it runs instead, and what an E-value is a function of.

11 min read

Embedding Biological Sequences for Similarity Search

The arithmetic that separates an exhaustive alignment scan from a vector index at a stated database size, and what the index cannot give you back.

10 min read

Variant Calling Explained: Finding a Mutation in Sequencing Data

How aligned reads become a genotype call, worked on a single position with thirty reads, and why counting bases is not enough.

11 min read

Single-Cell RNA Sequencing Analysis With AI

The reduce-then-cluster pipeline that turns a sparse cell-by-gene count matrix into labelled cell types, and the two steps in it that decide the answer.

11 min read

Classifying Microbial Species From Metagenomic Sequencing

How exact k-mer matching against a taxonomy assigns a species to a single 150-base read, worked through the k-mer arithmetic and the confidence threshold.

10 min read

Antibody Sequence Design With AI

The generate-then-score loop used to propose antibody variants, worked through the filters and proxy scores that shrink a library before anything is expressed.

10 min read

Predicting Gene Expression From DNA Sequence

What a sequence-to-expression model conditions on, worked through a promoter window and a motif scan, and the receptive-field decision that defines the architecture.

11 min read

Building a Phylogenetic Tree From Sequence Data

The distance-matrix-to-tree path worked end to end on four sequences, including the correction that makes distances additive and the criterion neighbour joining minimises.

10 min read

Protein Structure Similarity Search Explained

Retrieving known structures similar to a query structure: what TM-score measures, and the trick that turns three-dimensional search back into string search.

10 min read

Designing a CRISPR Guide RNA With AI

How candidate guides are enumerated, scored for on-target activity and ranked by off-target risk, worked through a mismatch-penalty calculation.

11 min read

What It Costs to Embed a Genome for Search

The arithmetic from genome length through chunk count and token count to a bill, with every input labelled as an assumption you should substitute.

10 min read

Transfer Learning From Protein Language Models

Fitting a predictor on a few hundred labelled sequences using pretrained embeddings, worked through pooling, the head, and the data split that decides whether the result is real.

11 min read

Detecting Contamination in Sequencing Data

Unexpected species in a classification report have four different causes with four different fixes; the read-fraction and coverage-breadth checks tell them apart.

11 min read

Other topics