Generation probabilities

The Specificity view's Generation part computes each clonotype's generation probability, the probability that recombination alone makes its CDR3s. Receptors recombination makes often are found in many people by chance; the probability says how a receptor is made, not what it recognizes.

Each clonotype's probability

The Specificity view's Generation part on Dash et al.'s mouse epitope-specific TCRs under OLGA's mouse models: the distribution of the paired clonotypes' generation probabilities (each the product of its two chains'), most between 10 to the minus 20 and 10 to the minus 10 and a few far lower, and the most abundant clonotypes with their probabilitiesThe Specificity view's Generation part on Dash et al.'s mouse epitope-specific TCRs under OLGA's mouse models: the distribution of the paired clonotypes' generation probabilities (each the product of its two chains'), most between 10 to the minus 20 and 10 to the minus 10 and a few far lower, and the most abundant clonotypes with their probabilities
Dash et al. 2017's mouse TCRs under OLGA's mouse models: the clonotypes' generation probabilities, and the most abundant with theirs.

Open T- or B-cell receptors, define clonotypes by junction (Clonotypes), and open Specificity › Generation. Compute the probabilities computes each clonotype's, as a job, and keeps the result with the project:

The Clonotypes view's inspector shows the probability of the clonotype chosen, and each chain's, under the same choices.

The probability

A recombination model gives the probability of each event that makes a chain: its V, D and J genes, how many nucleotides each gene end loses or gains as a palindrome, and the nucleotides inserted between them. A CDR3's generation probability (Sethna et al. 2019) sums the probabilities of every event that makes it, the junction from the conserved cysteine to the phenylalanine or tryptophan, both included:

ClonoLoom computes it as OLGA does, by dynamic programming over the CDR3's codons, its choices included: every insertion length the model allows, a palindrome made from the gene's part of the CDR3, and only the genes OLGA uses (those its anchor files mark functional).

The models

The organism is the one whose models name the most of the dataset's V genes, unless you choose it. A chain whose locus has no model (TRG or TRD, or anything but TRB under ClonoLoom's model), or whose genes the model lacks when the genes are part of the probability, has none, and the result counts why; a pair has one only when each chain has one.

How it is checked

Under OLGA's seven models, the probabilities of 99,949 CDR3s (the development data's T- and B-cell chains, CDR3s OLGA draws from each model, nucleotide junctions, CDR3s with their genes, and CDR3s with residues of any amino acid) are within a relative 10−9 of OLGA 1.3.0's (in fact within 3 × 10−15). In one place ClonoLoom counts events OLGA leaves out: an insertion of the longest length a model allows, when that length is one more than a multiple of three and the insertion starts a codon. Of the seven models, it changes mouse TRA's (whose insertions reach 22 nucleotides) by more than a relative 10−15: by up to 13% of a probability among the 5,583 mouse TRA CDR3s compared. OLGA's own generator makes these receptors. Under ClonoLoom's model, the probabilities agree with how often its simulator makes each of 200 junctions in 20 million rearrangements, and its generator with the probabilities, under its own model and OLGA's human TRB model.

Using the result

Both plots save as figures. Export writes each clonotype's probability, and each chain's, and each sample's quartiles, as CSV. The methods paragraph names the models by their checksum. Scripts use measure_generation (Remote control). A million TRB CDR3s take about 30 seconds on ten processors.