1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//! High-performance antibody and TCR sequence numbering.
//!
//! `immunum` numbers antibody and T-cell receptor (TCR) variable domain sequences
//! using Needleman-Wunsch semi-global alignment against position-specific scoring
//! matrices (PSSM) built from consensus sequences with BLOSUM62 substitution scores.
//! Chain type is detected automatically by aligning against all requested chains and
//! selecting the best match.
//!
//! # Supported chains and schemes
//!
//! | Chain | Type | Schemes |
//! |-------|------|---------|
//! | IGH | Antibody heavy | IMGT, Kabat |
//! | IGK | Antibody kappa | IMGT, Kabat |
//! | IGL | Antibody lambda | IMGT, Kabat |
//! | TRA | TCR alpha | IMGT |
//! | TRB | TCR beta | IMGT |
//! | TRG | TCR gamma | IMGT |
//! | TRD | TCR delta | IMGT |
//!
//! # Quick start
//!
//! ```rust
//! use immunum::{Annotator, Chain, Scheme};
//!
//! // Create an annotator for all antibody chains with IMGT numbering
//! let annotator = Annotator::new(&[Chain::IGH, Chain::IGK, Chain::IGL], Scheme::IMGT, None).unwrap();
//!
//! let sequence = "QVQLVQSGAEVKRPGSSVTVSCKASGGSFSTYALSWVRQAPGRGLEWMGGVIPLLTITNYAPRFQGRITITADRSTSTAYLELNSLRPEDTAVYYCAREGTTGKPIGAFAHWGQGTLVTVSS";
//! let result = annotator.number(sequence).unwrap();
//!
//! println!("Chain: {}", result.chain); // IGH
//! println!("Confidence: {:.2}", result.confidence);
//!
//! // Iterate over (amino acid, IMGT position) pairs
//! for (aa, pos) in sequence.chars().zip(result.positions.iter()) {
//! println!("{aa} -> {pos}");
//! }
//! ```
//!
//! # Key types
//!
//! - [`Annotator`] — main entry point; holds loaded scoring matrices and numbers sequences
//! - [`NumberingResult`] — the output of [`Annotator::number`]: positions, chain, confidence
//! - [`Position`] — an IMGT/Kabat position such as `111` or `111A`
//! - [`Chain`] — chain type (`IGH`, `IGK`, `IGL`, `TRA`, `TRB`, `TRG`, `TRD`)
//! - [`Scheme`] — numbering scheme (`IMGT` or `Kabat`)
//!
//! # Modules
//!
//! - [`annotator`] — high-level annotation API
//! - [`alignment`] — Needleman-Wunsch semi-global alignment
//! - [`numbering`] — IMGT and Kabat numbering rules
//! - [`scoring`] — position-specific scoring matrices
//! - [`io`] — FASTA parsing and TSV/JSON/JSONL output
//! - [`types`] — core domain types
//! - [`error`] — error types
pub use imgt;
pub use kabat;
pub use ;
pub use ;
pub use ;
pub use ScoringMatrix;
pub use ;
pub use ;
pub use ;