immunum 0.9.2 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -19
- package/immunum_bg.wasm +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@ High-performance antibody and TCR sequence numbering in Rust, Python, and WebAss
|
|
|
16
16
|
Available as:
|
|
17
17
|
|
|
18
18
|
- **Rust crate** — core library and CLI
|
|
19
|
-
- **Python package** —
|
|
19
|
+
- **Python package** — with a [Polars](https://pola.rs) plugin for vectorized batch processing
|
|
20
20
|
- **npm package** — for Node.js and browsers
|
|
21
21
|
|
|
22
22
|
### Supported chains
|
|
@@ -28,13 +28,15 @@ Available as:
|
|
|
28
28
|
| IGL (lambda) | TRD (delta) |
|
|
29
29
|
| | TRG (gamma) |
|
|
30
30
|
|
|
31
|
+
Chain codes: `H` (IGH), `K` (IGK), `L` (IGL), `A` (TRA), `B` (TRB), `D` (TRD), `G` (TRG).
|
|
32
|
+
|
|
33
|
+
Chain type is automatically detected by aligning against all loaded chains and selecting the best match.
|
|
34
|
+
|
|
31
35
|
### Numbering schemes
|
|
32
36
|
|
|
33
37
|
- **IMGT** — all 7 chain types
|
|
34
38
|
- **Kabat** — antibody chains (IGH, IGK, IGL)
|
|
35
39
|
|
|
36
|
-
Chain type is automatically detected by aligning against all loaded chains and selecting the best match.
|
|
37
|
-
|
|
38
40
|
## Table of Contents
|
|
39
41
|
|
|
40
42
|
- [Python](#python)
|
|
@@ -46,6 +48,7 @@ Chain type is automatically detected by aligning against all loaded chains and s
|
|
|
46
48
|
- [Installation](#installation-1)
|
|
47
49
|
- [Usage](#usage)
|
|
48
50
|
- [Rust](#rust)
|
|
51
|
+
- [Installation](#installation-2)
|
|
49
52
|
- [Usage](#usage-1)
|
|
50
53
|
- [CLI](#cli)
|
|
51
54
|
- [Options](#options)
|
|
@@ -99,8 +102,6 @@ assert result.cdr3 == 'AREGTTGKPIGAFAH'
|
|
|
99
102
|
assert result.fr4 == 'WGQGTLVTVSS'
|
|
100
103
|
```
|
|
101
104
|
|
|
102
|
-
Chains: `"H"` (heavy), `"K"` (kappa), `"L"` (lambda), `"A"` (TRA), `"B"` (TRB), `"G"` (TRG), `"D"` (TRD).
|
|
103
|
-
|
|
104
105
|
### Polars plugin
|
|
105
106
|
|
|
106
107
|
For batch processing, `immunum.polars` registers elementwise Polars expressions:
|
|
@@ -138,9 +139,7 @@ npm install immunum
|
|
|
138
139
|
### Usage
|
|
139
140
|
|
|
140
141
|
```js
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
await init(); // load the wasm module
|
|
142
|
+
const { Annotator } = require("immunum");
|
|
144
143
|
|
|
145
144
|
const annotator = new Annotator(["H", "K", "L"], "imgt");
|
|
146
145
|
|
|
@@ -148,18 +147,27 @@ const sequence =
|
|
|
148
147
|
"QVQLVQSGAEVKRPGSSVTVSCKASGGSFSTYALSWVRQAPGRGLEWMGGVIPLLTITNYAPRFQGRITITADRSTSTAYLELNSLRPEDTAVYYCAREGTTGKPIGAFAHWGQGTLVTVSS";
|
|
149
148
|
|
|
150
149
|
const result = annotator.number(sequence);
|
|
151
|
-
console.log(result.chain);
|
|
150
|
+
console.log(result.chain); // "H"
|
|
152
151
|
console.log(result.confidence); // 0.97
|
|
153
|
-
console.log(result.numbering);
|
|
152
|
+
console.log(result.numbering); // { "1": "Q", "2": "V", ... }
|
|
154
153
|
|
|
155
154
|
const segments = annotator.segment(sequence);
|
|
156
|
-
console.log(segments.cdr3);
|
|
155
|
+
console.log(segments.cdr3); // "AREGTTGKPIGAFAH"
|
|
157
156
|
|
|
158
157
|
annotator.free(); // or use `using annotator = new Annotator(...)` with explicit resource management
|
|
159
158
|
```
|
|
160
159
|
|
|
161
160
|
## Rust
|
|
162
161
|
|
|
162
|
+
### Installation
|
|
163
|
+
|
|
164
|
+
Add to `Cargo.toml`:
|
|
165
|
+
|
|
166
|
+
```toml
|
|
167
|
+
[dependencies]
|
|
168
|
+
immunum = "0.9"
|
|
169
|
+
```
|
|
170
|
+
|
|
163
171
|
### Usage
|
|
164
172
|
|
|
165
173
|
```rust
|
|
@@ -174,20 +182,14 @@ let annotator = Annotator::new(
|
|
|
174
182
|
let sequence = "QVQLVQSGAEVKRPGSSVTVSCKASGGSFSTYALSWVRQAPGRGLEWMGGVIPLLTITNYAPRFQGRITITADRSTSTAYLELNSLRPEDTAVYYCAREGTTGKPIGAFAHWGQGTLVTVSS";
|
|
175
183
|
|
|
176
184
|
let result = annotator.number(sequence).unwrap();
|
|
177
|
-
|
|
178
185
|
println!("Chain: {}", result.chain); // IGH
|
|
179
186
|
println!("Confidence: {:.2}", result.confidence);
|
|
180
|
-
|
|
181
187
|
for (aa, pos) in sequence.chars().zip(result.positions.iter()) {
|
|
182
188
|
println!("{} -> {}", aa, pos);
|
|
183
189
|
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
Add to `Cargo.toml`:
|
|
187
190
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
immunum = "0.9"
|
|
191
|
+
let segments = annotator.segment(sequence).unwrap();
|
|
192
|
+
println!("CDR3: {}", segments.cdr3);
|
|
191
193
|
```
|
|
192
194
|
|
|
193
195
|
## CLI
|
package/immunum_bg.wasm
CHANGED
|
Binary file
|