Guide & API
How to use the AIRBabel website and its REST API.
Overview
AIRBabel is a reference database of immunoglobulin and T-cell receptor (TCR) allele sequences, leader signal-peptide coding sequences, and recombination signal sequences (RSSs) across species. Each sequence gets a deterministic Server UID and is paired with the names it carries in multiple naming schemes (e.g. IMGT, OGRDB, internal sets), so you can resolve an alias to a canonical sequence and find sequence-similar alleles.
Identity is the sequence, not the name: the same
nucleotide sequence always maps to the same UID, and a name is just a label attached to it.
Every record carries source attribution as compact URIs (CURIEs), e.g.
IMGT/GENE-DB:, OGRDB:, GENBANK:).
Database scope
Live counts per segment, locus and species are on the overview. What that page cannot tell you is where the scope boundaries are, so they are stated here.
| Segment | Coverage |
|---|---|
| V | Variable-region allele sequences from all represented immunoglobulin (IG) and TCR loci. This is the only segment class that also carries an amino-acid sequence and a protein UID. |
| D | Diversity-region allele sequences from IGH, TRB and TRD, the loci with D segments represented here. Compared only against D alleles of the same length; see similarity. |
| J | Joining-region allele sequences from all represented IG and TCR loci. |
| C | Immunoglobulin constant-region sequences for IGH, IGK, IGL, and IGI, a zebrafish locus, represented as the secreted form. The membrane-bound form and the TCR constants are deferred. |
An IGH constant region is assembled from the per-domain records IMGT publishes (CH1 + hinge + CH2 + CH3… + CHS, in domain order); IGK, IGL and IGI are published whole and stored as they come. Either way the ordered composition is kept as an annotation, so the domain boundaries stay recoverable from the stored sequence.
AIRBabel stores amino-acid sequence only where translation is defined for the represented record.
A protein is stored only where a source published one or where translating the coding region is
well‑defined; in the current scope this means V. Amino-acid search and the aa similarity
view are absent on D, J and C records rather than empty; no stored translation is defined for those record classes.
What AIRBabel adds
Primary databases publish the reference sets. What this service adds is what can be asked of a sequence already in hand. Every row below is a live query, so the claim and its demonstration are the same thing.
| Capability | What it does | |
|---|---|---|
| Sequence-hash identity | Identity is sha256 of the normalised sequence, so the same DNA
is one record whichever source contributed it, and the same UID in any sibling
database, with no central registry. |
how → |
| Source-attributed aliases | Every name a sequence carries, each tagged with its scheme (IMGT, OGRDB, VDJbase, IgDiscover, IgLabel) and the source that attributes it. | try → |
| Historical name recovery | Names affected by renaming, changes in published sequence extent, or withdrawal still resolve, because release snapshots attach former designations to the sequence hash, not to a name. | try → |
| Partial / contained match | Paste a truncated or primer-trimmed sequence and score it over the best-matching window, so a contained fragment resolves near 100%. | try → |
| Protein UID grouping | V alleles that differ only synonymously share one protein UID, so “which protein does this call encode?” is a lookup, not an alignment. | try → |
| Cross-species neighbours | The closest alleles in another species, ranked by % identity, from a precomputed all-against-all cache. | try → |
| Publication → alleles | Given a PubMed ID, retrieve records linked to that publication, separated by evidence tier rather than summed into one number. | try → |
| AIRR-aligned output | Export records as AIRR AlleleDescription JSON, with species
and sources as CURIEs. |
try → |
Download. The dataset is available through public REST API endpoints:
FASTA ·
JSON ·
manifest & terms. Both accept category,
segment, species (and kind=nt|aa for FASTA). Reuse requires
attribution; each source's licence and citation is on
Sources & citations.
Naming & identifiers
Every sequence has one canonical Server UID and any number of names. The UID is the identity; names are labels attached to it, each tagged with the scheme it follows and the source that attributes it.
Server UID: <SPECIES>-<CODE><hash>
HUMAN-VQLNRZF6P
│ │ │
│ │ └────── base32 prefix of sha256(sequence) (coding: 8 chars, leader/RSS: 5)
│ └────────── segment / category code: V/D/J/C (coding), L (leader), R (rss)
└────────────── species tag: HUMAN, MOUSE, RHESUS, GORILLA, …
The trailing token is a prefix of the sequence hash, so a UID is verifiable from the normalized nucleotide sequence: the same nucleotide sequence always mints the same UID here and in any sibling database, so independent instances can assign the same UID without a central registry. The full sequence hash is stored as the authoritative cross-database key.
Protein UID: <SPECIES>-VP-<6 chars>, e.g. HUMAN-VP-J6QJRI
V coding alleles also carry a protein UID derived from the amino-acid hash. It is many-to-one by design: alleles whose nucleotide sequences differ but translate to the same protein share one protein UID, so it groups synonymous alleles.
A name is stored with a scheme (how the label is formatted) and a source (who
attributes it), so the same allele usually carries several. In API responses you see them under
allele_names (each with scheme + source), and the AIRR view
exposes a primary label plus aliases (e.g. IGHV1-69*01 also
surfaces IGHV1-69D*01).
| Scheme | Meaning |
|---|---|
imgt | IMGT/IUIS gene and allele name, e.g. IGHV1-69*01. |
ogrdb | OGRDB allele name; inferred alleles carry an *i<n> marker. |
vdjbase | VDJbase-style name, with a _<variant> suffix. |
igdiscover | IgDiscover-style name; novel alleles carry an _S<n> suffix. |
iglabel | IgLabel: a four-character deterministic, sequence-derived label. |
Sources are recorded as CURIEs with attribution, currently
IMGT/GENE-DB and OGRDB (internal sets HUSA / MUSA
when loaded). The service aggregates and attributes names; it does not adjudicate nomenclature.
Using the website
From the Search page, enter an allele name (e.g. IGHV1-69*01), a
Server UID, or paste a nucleotide or amino-acid sequence. The mode selector controls how the
query is interpreted, and species restricts results.
| Mode | What it does |
|---|---|
| auto | Name, Server UID, or sequence. An exact allele/UID match jumps straight to the record. |
| name | Fuzzy name match (handles spacing/formatting variants). |
| sequence | Nucleotide similarity: exact, sub/superstring, and edit-distance. |
| aa | Amino-acid match. V only; D, J and C have no stored protein sequence (see scope). |
| similar | Alleles similar to a given name/UID; goes straight to the similarity view. |
| pmid | PubMed ID search returning AIRBabel records linked to that publication, with evidence tier annotations. See Searching by publication. |
An allele record page shows the nucleotide and amino-acid sequence, all aliases (names from each scheme), the contributing sources, cross-references, literature references, and any linked RSS. From a record you can list similar alleles by nucleotide or amino acid, within an identity threshold, restricted to the same species or across species.
Literature references. Each record lists PubMed publications for the allele.
References marked verified come from the curated tables. Those marked unverified are
auto-collected in v1 by matching the allele name (e.g. IGHV1-2*01) against the
literature via Europe PMC. They are not manually checked, so some may be wrong or not
actually about that allele. Treat unverified references as leads to follow, not as ground truth.
Tip: searches are capped (default 100 rows). When a result set is truncated the
response is flagged capped: true. Narrow by species or use a more specific query.
Reading a result
Every hit carries a match type (the Match column on the site,
matched_by in JSON). It says how the hit was found, which is not the same
question as how similar it is; a name match, in particular, says nothing about the
sequence. The same table is available one click away on any result page.
| Match | What it means |
|---|---|
exact | Query and stored sequence are identical after normalisation; same hash, therefore the same allele whatever either is called. |
substring | One sequence is fully contained in the other, with no mismatches: your query is a fragment of this allele, or the allele is a fragment of your query. |
similar | Neither exact nor contained. Ranked by % identity (see similarity); read it together with the identity score. |
name | Matched a label. Carries no sequence claim; the same name denotes different sequences in different species. |
cached | Served from the precomputed neighbour cache. The same identity calculation, done ahead of time. |
protein_uid | Matched a protein UID: V alleles that differ in nucleotide sequence but translate to the same amino-acid sequence. |
superseded | A record status, not a match type: IMGT has since published this allele at a different extent. The tag links to the current record. |
Two further distinctions worth keeping apart. Cross-species neighbour: a hit in another species, found by identity rather than by name; numbering schemes are independent, so allele names do not establish orthology. Verified vs mined literature evidence: a curator-published or GenBank-derived citation is an assertion someone stands behind; a mined name-only hit is a lead. They are shown apart and never summed; see searching by publication.
Searching by publication (PMID)
The reference list on a record answers “which papers cite this allele?”. PMID
mode asks the reverse: given a paper, which AIRBabel allele records are linked to it? Enter a
PubMed ID as bare digits (29163486), as PMID:29163486, or as a PubMed
URL. In auto mode a bare PubMed ID is recognised without selecting the mode.
Every hit is tagged with how the paper attests it, and the tiers are reported separately rather than summed, because they are not equally strong claims:
| Evidence | What it means |
|---|---|
| verified | A source published the citation as part of its own record, or it comes from a GenBank cross-reference. This is a curator-published or GenBank-derived assertion, not an AIRBabel assertion. |
| sequence | The paper’s full text or a supplementary file contains this exact sequence, matched by hash. |
| name only | The paper mentions the allele name. This is a lead, not sequence-level evidence, because the same string can denote different sequences in different species. |
Archived records are returned in PMID search and flagged. That is deliberate: a paper citing a name IMGT has since retired is precisely the case where the citation still has to lead somewhere. Where a newer record supersedes the one cited, the row links to it.
Coverage is partial, and an empty result is not negative evidence. Citations reach this database two ways: a source publishes them with its records, or AIRBabel mines a paper’s full text and supplements. Neither pass is exhaustive. Most of what is loaded today comes from curated sets that carry their own references. So an empty result means AIRBabel holds no citation linking that paper to an allele; it is not evidence that the paper describes none. Treat a linked record as evidence within AIRBabel and an empty result as absence of recorded linkage.
Also available as JSON: GET /api/pmid/{pmid}, which returns the same
tiered hits and 422 for a string that is not a PubMed ID.
Sequence similarity calculation
The % identity between two sequences is their normalised Levenshtein
(edit-distance) similarity over the optimal edit-distance alignment of the two stored
ungapped sequences, reported as 1 - edits / length:
identity = 1 − edits / length
- An edit is a substitution, insertion, or deletion. One substitution between
two equal-length sequences lowers identity by exactly
1 / length, so the numbers track a standard mismatch count. - Computed separately for nucleotide and amino-acid sequences.
- Similarity is computed all-against-all within each species, and between species for the cross-species view, then stored as a precomputed cache, so a search is a fast lookup.
- Results are ranked by identity; each view shows neighbours at or above your chosen threshold.
- Alleles are only ever compared within one segment. V and J segments represent different biological classes, so they are not ranked against each other.
D alleles use a segment-specific rule. A D segment is 8–148 nt (median 19 nt). At that length an edit distance can open a gap to flatter a score, and almost any two D alleles look related. So a D allele is compared only against D alleles of exactly the same length, and scored by counting mismatching positions (Hamming distance) rather than by edit distance, so no gap can be introduced.
The consequence is visible: two D alleles of different lengths are not ranked against each other at all, so a D search returns fewer neighbours than a V search and can return none. This is a method boundary, not a metadata gap; separating short sequences of unequal length needs a multiple alignment, which this database does not compute.
Note: this is edit distance on the stored (ungapped) sequences, so it accounts for insertions and deletions as well as substitutions. It matches a position-by-position comparison for similar alleles, and can differ slightly for distantly related or different-length sequences.
Two limits of the amino-acid comparison, worth knowing before you read a score. First, every substitution costs the same: this is unit-cost edit distance, not a substitution matrix. I to V and I to D are both one edit, though only one of them is conservative. That is the right choice for ranking alleles of the same gene, which differ at a handful of positions; it is the wrong tool for detecting remote homology, where a BLOSUM-scored local alignment (BLAST, DIAMOND, MMseqs2, parasail) is what you want. Second, a short query in partial mode scores against its best window, so a handful of residues contained in an allele scores ~100%; true, and not informative. Read the score together with the query length shown beside it.
Full-length vs partial match. By default identity is computed over the full sequences, so a partial or truncated query is penalised for the length it does not cover (a 200 nt fragment of a 300 nt allele scores ~67%). Tick “partial / contained match” on a sequence or amino-acid search to score identity over the best-matching window instead: a fragment fully contained in an allele then scores ~100%. Use it when you paste an incomplete sequence and want to know which allele it came from.
Dataset release & how to cite a result
A served identity score depends on two things that move independently: which data is loaded, and how distance is computed over it. A build is therefore stamped with both; each is digested, so two deployments can be compared by one string instead of by counting rows.
| Field | What it pins |
|---|---|
release | YYYY.MM.DD (with .N for a second build the same day). The human-facing version. |
content_digest | sha256 over the sequence identity set (species | category | sequence hash) and the name set (name | scheme | source). Recomputable from the database, so an instance holding different alleles, or the same alleles under different names, reports a different string. |
similarity_digest | sha256 over the distance parameters: metric, the per-segment equal-length policy, the cache floors and cap. Change NEIGHBOR_FLOOR and this digest moves, which is the point. |
neighbors_built | Whether the precomputed neighbour cache is present. Same metric either way; without it, similarity is computed live. |
code_version | The software that produced the build; separate from the data version, never a substitute for it. |
All of it is at GET /version, repeated in
/api/export and in the JSON export, and carried on a FASTA
download as the X-Dataset-Release and X-Dataset-Digest headers, so
a file that leaves here can still say which build it is. The Sources
page shows the same record in full.
Citing a result. Quote the release and the date. If the exact
comparison matters, such as a threshold, a neighbour list, or a reported % identity, quote the
similarity_digest too: it is what makes the number reproducible. An instance reporting
dataset: null has not been stamped; cite the access date instead of inventing a
version.
REST API
The same query core is exposed as JSON over HTTP. Interactive, auto-generated documentation:
- /docs: Swagger UI (try requests in the browser)
- /redoc: ReDoc reference
- /openapi.json: raw OpenAPI schema
Base URL for this instance: /
A runnable, dependency-free Python client covering name resolution, sequence resolution, record retrieval, similarity, AIRR output and PMID lookup is on the tutorial page and as a downloadable file. The same page provides five worked examples.
| Endpoint | Description |
|---|---|
GET /api/resolve?query=<name|uid> | Resolve a name or UID to its canonical record. Add &view=airr for an AIRR AlleleDescription. |
GET /api/sequences/{uid} | Fetch a record by Server UID. Supports ?view=airr. |
GET /api/sequences/{uid}/aliases | All names this sequence carries, each with its scheme. |
GET /api/sequences/{uid}/similar | Similar alleles. Params: min_identity (0–1, default 0.9), same_species (default true), kind=nt|aa. |
GET /api/rss/{uid} | Coding alleles linked to this RSS, with the source of each link. |
GET /api/rss/{uid}/similar | RSS sequences similar to this one. Params: min_identity, same_species. |
GET /api/search/name?q=<term> | Fuzzy name search. Optional &species= (any species tag, comma-separated; omit for all). |
POST /api/search/sequence | Nucleotide similarity search. JSON body {"sequence": "..."}. |
POST /api/search/aa | Amino-acid search. JSON body {"sequence_aa": "..."}. |
GET /version | Software version and the stamped dataset release: content digest, distance-computation digest, counts, source versions. See release & citing. |
GET /healthz | Liveness probe. |
Examples
Responses below are trimmed (long sequences shown as …, list tails as
…) for readability.
# resolve an alias to its canonical record
curl "/api/resolve?query=IGHV1-69*01"
{
"matched_by": "name",
"record": {
"native": {
"uid": "HUMAN-VQLNRZF6P",
"species": "HUMAN", "category": "coding", "segment": "V", "locus": "IGH",
"sequence": "CAGGTGCAGCTGGTG…TGTGCGAGAGA",
"sequence_aa": "QVQLVQSGAEVKKPGSSVKVSCKAS…VYYCAR",
"protein_uid": "HUMAN-VP-J6QJRI",
"functional": true, "length": 296,
"allele_names": [
{ "name": "IGHV1-69*01", "scheme": "imgt", "source": "IMGT" },
{ "name": "IGHV1-69D*01", "scheme": "imgt", "source": "IMGT" }
]
}
}
}
# the same record as an AIRR AlleleDescription
curl "/api/resolve?query=IGHV1-69*01&view=airr"
{
"label": "IGHV1-69*01",
"aliases": ["IGHV1-69D*01"],
"coding_sequence": "CAGGTGCAGCTGGTG…TGTGCGAGAGA",
"sequence_aa": "QVQLVQSGAEVKKPGSSVKVSCKAS…VYYCAR",
"functional": true, "locus": "IGH", "sequence_type": "V",
"species": { "id": "NCBITAXON:9606", "label": "Homo sapiens" },
"germline_set_ref": null
}
# fuzzy name search, restricted to mouse
curl "/api/search/name?q=IGHV1&species=mouse"
{
"query": "IGHV1",
"count": 100,
"capped": true,
"hits": [
{ "uid": "MOUSE-VC6BUL56P", "label": "IGHV1-9*02", "species": "MOUSE",
"locus": "IGH", "sequence_type": "V", "score": 0.5455,
"matched_by": "name", "aliases": ["IGHV1-9*02"] },
…
]
}
# alleles similar (amino acid) to a Server UID, same species, ≥95% identity
curl "/api/sequences/HUMAN-VBSLUZ7BO/similar?kind=aa&min_identity=0.95"
{
"query": "aa similar to HUMAN-VBSLUZ7BO",
"count": 15,
"capped": false,
"hits": [
{ "uid": "HUMAN-VEQGFHKOW", "label": "IGHV1-69*21", "species": "HUMAN",
"locus": "IGH", "sequence_type": "V", "score": 1.0,
"matched_by": "exact", "aliases": ["IGHV1-69*21"] },
…
]
}
# search by a nucleotide sequence (exact / substring / edit-distance)
curl -X POST "/api/search/sequence" \
-H "content-type: application/json" \
-d '{"sequence": "CAGGTGCAGCTGGTGCAGTCTGGGGCTGAGGTGAAGAAGCCTGGGTCCTCGGTGAAGGTCTCCTGCAAGGCTTCTGGAGGCACCTTCAGC"}'
{
"query": "<90 nt>",
"count": 100,
"capped": true,
"hits": [
{ "uid": "HUMAN-VS2XWHE7J", "label": "IGHV1-69*03", "species": "HUMAN",
"locus": "IGH", "sequence_type": "V", "score": 1.0,
"matched_by": "substring", "aliases": ["IGHV1-69*03"] },
…
]
}
# search by an amino-acid sequence
curl -X POST "/api/search/aa" \
-H "content-type: application/json" \
-d '{"sequence_aa": "QVQLVQSGAEVKKPGSSVKVSCKAS"}'
{
"query": "<25 aa>",
"count": 1,
"capped": false,
"hits": [
{ "uid": "HUMAN-VDZQSSG5X", "label": "IGHV1/OR16-3*01", "species": "HUMAN",
"locus": "IGH", "sequence_type": "V", "score": 0.92,
"matched_by": "similar", "aliases": ["IGHV1/OR16-3*01"] }
]
}
Responses are JSON. Search endpoints return {query, count, capped, hits[]};
each hit carries the uid, label, species, locus,
match score, and aliases. Use ?view=airr on
resolve or sequences for field names aligned with the AIRR AlleleDescription schema.