Every public symbol, every config key, every AIRR field. Reference is exhaustive — Concepts explain why, Guides walk you through how, and this is the page you grep when you already know what you're looking for.
Everything importable from genairr. Grouped by module, sorted by what
you'll touch first.
genairr.experiment
core
.recombine(), .mutate(), .corrupt_*() and .run(n).
fn
Experiment.recombine(productive_only: bool = True)
Append the recombination phase (sample · trim · assemble · NP).
fn
Experiment.mutate(model: str = "s5f", count: tuple[int,int] = None, rate: float = None)
Append the somatic-hypermutation phase. Pass count or rate, not both.
fn
Experiment.corrupt_5prime_loss(p: float, max_loss: int = 60)
Probabilistically truncate the 5′ end up to max_loss bp.
fn
Experiment.corrupt_indels(rate: float)
Insert low-rate ins/del events; uniform over positions.
fn
Experiment.run(n: int) → list[Record]
Execute the chain and return n AIRR records.
fn
Experiment.iter(n: int) → Iterator[Record]
Streaming variant for large n — never materializes the full batch.
fn
Experiment.add_pass(p: Pass, at: str = "end")
Insert a custom Pass into the pipeline. at may be "start" / "end" / "after:<name>".
genairr.pipeline
extending
yaari_2013, cui_2016.
class
EndLossPass(p_5prime: float, p_3prime: float, max_loss: int = 60)
End truncation model for short-read library prep.
class
NCorruptionPass(rate: float)
Scatters N-bases at the given per-position rate.
genairr.contracts
predicates
anchor_preserved + productive_junction_frame + no_stop_codon_in_junction.
fn
anchor_preserved() → Contract
Cys-104 (V) and Trp/Phe (J) anchor codons survive trimming.
fn
productive_junction_frame() → Contract
CDR3 length divisible by 3.
fn
no_stop_codon_in_junction() → Contract
No TAA/TAG/TGA inside CDR3.
genairr.io
export
truth=False to strip truth_* fields.
fn
write_parquet(records, path, compression: str = "zstd")
Columnar export. ~10× smaller than TSV at default compression.
fn
write_fasta(records, path, header: str = "{seq_id}")
Plain FASTA. Header template is f-string over record fields.
+
Show all 28 io symbols →
readers, schema validators, AIRR↔IMGT mappers
14 built-in configs. Drop a name into Experiment("…") or fork the YAML
and pass a path. Schema is documented per-key.
~70 fields per record. truth_* is the simulator's ground-truth answer. evidence is what an aligner would output. Use the former to score the latter.
truth_n_mutations / sequence_length.Six commands installed alongside the Python package. For one-off simulations and CI.
genairr simulate
Run a config and write AIRR output. The 90% command.
genairr simulate human_igh_naive -n 50000 -o out.tsv
genairr inspect
Print a single sequence's full trace — every pass, every event.
genairr inspect human_igh_naive --seed 42
genairr validate
Run marginal QC on a TSV against an empirical reference panel.
genairr validate out.tsv --against oas_human_b
genairr configs
List built-in configs with their key parameters.
genairr configs --filter human
genairr benchmark
Plug-and-play aligner benchmark against simulated truth.
genairr benchmark igblast --n 10000
genairr export
Convert a saved run between TSV / Parquet / FASTA.
genairr export out.tsv -o out.parquet