AdvancedAnalysisFileParser 0.1.4__cp311-cp311-win_amd64.whl

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.
Files changed (56) hide show
  1. AdvancedAnalysisFileParser/AdvancedAnalysisConstants.cp311-win_amd64.pyd +0 -0
  2. AdvancedAnalysisFileParser/AdvancedAnalysisConstants.pyi +13 -0
  3. AdvancedAnalysisFileParser/AdvancedAnalysisParser.cp311-win_amd64.pyd +0 -0
  4. AdvancedAnalysisFileParser/AdvancedAnalysisParser.pyi +95 -0
  5. AdvancedAnalysisFileParser/HG002.paraphase.json +128289 -0
  6. AdvancedAnalysisFileParser/Models/ConditionOperator.cp311-win_amd64.pyd +0 -0
  7. AdvancedAnalysisFileParser/Models/ConditionOperator.pyi +14 -0
  8. AdvancedAnalysisFileParser/Models/FieldCondition.cp311-win_amd64.pyd +0 -0
  9. AdvancedAnalysisFileParser/Models/FieldCondition.pyi +30 -0
  10. AdvancedAnalysisFileParser/Models/FieldWarningConfig.cp311-win_amd64.pyd +0 -0
  11. AdvancedAnalysisFileParser/Models/FieldWarningConfig.pyi +9 -0
  12. AdvancedAnalysisFileParser/Models/JsonDict.cp311-win_amd64.pyd +0 -0
  13. AdvancedAnalysisFileParser/Models/JsonDict.pyi +6 -0
  14. AdvancedAnalysisFileParser/Models/SectionConfig.cp311-win_amd64.pyd +0 -0
  15. AdvancedAnalysisFileParser/Models/SectionConfig.pyi +12 -0
  16. AdvancedAnalysisFileParser/Models/__init__.py +13 -0
  17. AdvancedAnalysisFileParser/Parsers/AdvancedAnalysisFileParserFactory.cp311-win_amd64.pyd +0 -0
  18. AdvancedAnalysisFileParser/Parsers/AdvancedAnalysisFileParserFactory.pyi +15 -0
  19. AdvancedAnalysisFileParser/Parsers/DragenTruSightOncology500TSVParser.cp311-win_amd64.pyd +0 -0
  20. AdvancedAnalysisFileParser/Parsers/DragenTruSightOncology500TSVParser.pyi +17 -0
  21. AdvancedAnalysisFileParser/Parsers/IAdvancedAnalysisFileParser.cp311-win_amd64.pyd +0 -0
  22. AdvancedAnalysisFileParser/Parsers/IAdvancedAnalysisFileParser.pyi +45 -0
  23. AdvancedAnalysisFileParser/Parsers/JsonSectionParser.cp311-win_amd64.pyd +0 -0
  24. AdvancedAnalysisFileParser/Parsers/JsonSectionParser.pyi +14 -0
  25. AdvancedAnalysisFileParser/Parsers/OneLineTsvParser.cp311-win_amd64.pyd +0 -0
  26. AdvancedAnalysisFileParser/Parsers/OneLineTsvParser.pyi +12 -0
  27. AdvancedAnalysisFileParser/Parsers/__init__.py +7 -0
  28. AdvancedAnalysisFileParser/README.md +572 -0
  29. AdvancedAnalysisFileParser/Warnings/CarrierPositiveWarning.cp311-win_amd64.pyd +0 -0
  30. AdvancedAnalysisFileParser/Warnings/CarrierPositiveWarning.pyi +19 -0
  31. AdvancedAnalysisFileParser/Warnings/ConditionWarning.cp311-win_amd64.pyd +0 -0
  32. AdvancedAnalysisFileParser/Warnings/ConditionWarning.pyi +28 -0
  33. AdvancedAnalysisFileParser/Warnings/GbaWarning.cp311-win_amd64.pyd +0 -0
  34. AdvancedAnalysisFileParser/Warnings/GbaWarning.pyi +19 -0
  35. AdvancedAnalysisFileParser/Warnings/GenotypeWarning.cp311-win_amd64.pyd +0 -0
  36. AdvancedAnalysisFileParser/Warnings/GenotypeWarning.pyi +19 -0
  37. AdvancedAnalysisFileParser/Warnings/IWarning.cp311-win_amd64.pyd +0 -0
  38. AdvancedAnalysisFileParser/Warnings/IWarning.pyi +10 -0
  39. AdvancedAnalysisFileParser/Warnings/SmnWarning.cp311-win_amd64.pyd +0 -0
  40. AdvancedAnalysisFileParser/Warnings/SmnWarning.pyi +19 -0
  41. AdvancedAnalysisFileParser/Warnings/WarningFactory.cp311-win_amd64.pyd +0 -0
  42. AdvancedAnalysisFileParser/Warnings/WarningFactory.pyi +16 -0
  43. AdvancedAnalysisFileParser/Warnings/__init__.py +7 -0
  44. AdvancedAnalysisFileParser/__init__.py +18 -0
  45. AdvancedAnalysisFileParser/dragen_500_tsv_config.json +53 -0
  46. AdvancedAnalysisFileParser/dragen_targeted_config.json +96 -0
  47. AdvancedAnalysisFileParser/gba_tsv_config.json +23 -0
  48. AdvancedAnalysisFileParser/pacbio_paraphase_config.json +176 -0
  49. AdvancedAnalysisFileParser/py.typed +0 -0
  50. AdvancedAnalysisFileParser/smn_tsv_config.json +23 -0
  51. advancedanalysisfileparser-0.1.4.dist-info/METADATA +158 -0
  52. advancedanalysisfileparser-0.1.4.dist-info/RECORD +56 -0
  53. advancedanalysisfileparser-0.1.4.dist-info/WHEEL +5 -0
  54. advancedanalysisfileparser-0.1.4.dist-info/entry_points.txt +3 -0
  55. advancedanalysisfileparser-0.1.4.dist-info/licenses/LICENSE +9 -0
  56. advancedanalysisfileparser-0.1.4.dist-info/top_level.txt +1 -0
@@ -0,0 +1,572 @@
1
+ # Advanced Analysis Parser
2
+
3
+ A Python package to parse Illumina-DRAGEN "special caller" outputs (TSV/JSON) into a unified JSON format, with automatic warnings based on user-defined or default conditions. Supports oncology, GBA, SMN, HBA, and more.
4
+
5
+ ---
6
+
7
+ ## Features
8
+
9
+ - Unified JSON output for multiple DRAGEN caller types (TSV/JSON)
10
+ - Automatic warnings for each file type, based on config or defaults
11
+ - Pluggable parser architecture for new file types
12
+ - CLI and Python API usage
13
+ - Example configs and test data included
14
+
15
+ ---
16
+
17
+ ## Installation
18
+
19
+ Install from PyPI (recommended):
20
+
21
+ ```bash
22
+ pip install AdvancedAnalysisFileParser
23
+ ```
24
+
25
+ Or from source:
26
+
27
+ ```bash
28
+ git clone https://github.com/geneyx/geneyx.analysis.api.git
29
+ cd geneyx.analysis.api/scripts/AdvancedAnalysisFileParser
30
+ pip install -e .
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Quickstart
36
+
37
+ ### Python API Usage
38
+
39
+ ```python
40
+ from AdvancedAnalysisFileParser.AdvancedAnalysisParser import AdvancedAnalysisParser
41
+
42
+ request = {
43
+ "input_dir": "./Test",
44
+ "output_dir": "./Test",
45
+ "output_json": "adv_output.json",
46
+ # Optionally, you can specify input_files or map_files for custom configs
47
+ }
48
+ parser = AdvancedAnalysisParser(request)
49
+ parser.run() # writes output to adv_output.json
50
+
51
+ # Or get result as dict:
52
+ result = parser.run(return_dict=True)
53
+ print(result)
54
+ ```
55
+
56
+ ### Command-Line Usage
57
+
58
+ Create a config file (e.g. `config.json`):
59
+
60
+ ```json
61
+ {
62
+ "input_dir": "./Test",
63
+ "output_dir": "./Test",
64
+ "output_json": "adv_output.json"
65
+ }
66
+ ```
67
+
68
+ Then run:
69
+
70
+ ```bash
71
+ python -m AdvancedAnalysisFileParser.AdvancedAnalysisParser -c config.json
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Configuration
77
+
78
+ The parser uses config files (JSON) to define how to parse and warn for each file type. Default configs are provided for:
79
+
80
+ - GBA: `gba_tsv_config.json`
81
+ - SMN: `smn_tsv_config.json`
82
+ - Oncology: `dragen_500_tsv_config.json`
83
+ - JSON: `dragen_targeted_config.json`
84
+
85
+ You can override or extend these by providing your own config in the `map_files` key of the request.
86
+
87
+ ### Example request/config structure
88
+
89
+ | Key | Type | Description |
90
+ | ------------- | ------ | --------------------------------------------------------------------- |
91
+ | `output_json` | string | Filename for the generated JSON (default: `adv_analysis_output.json`) |
92
+ | `input_dir` | string | Directory containing all input files |
93
+ | `input_files` | list | (Optional) List of files to parse |
94
+ | `map_files` | object | (Optional) Mapping of filenames → caller definitions |
95
+
96
+ ---
97
+
98
+ ## Warnings
99
+
100
+ Warnings are generated automatically for each caller/file type, based on the config. Each config defines conditions for warnings (see `*_config.json` files for examples). You can customize these for your use case.
101
+
102
+ ---
103
+
104
+ ## Testing
105
+
106
+ Run the test suite to validate all parsing and warning logic:
107
+
108
+ ```bash
109
+ pytest AdvancedAnalysisFileParser/Test_AdvancedAnalysisParser.py
110
+ ```
111
+
112
+ Or run the test script:
113
+
114
+ ```bash
115
+ python AdvancedAnalysisFileParser/run_test_parser.py
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Example Data
121
+
122
+ See the `Test/` folder for example input files (TSV/JSON) and expected outputs.
123
+
124
+ ---
125
+
126
+ ## License
127
+
128
+ MIT
129
+
130
+ # Build your JSON request (see next section for details)
131
+
132
+ request: JsonDict = {
133
+ "output_json": "out.json",
134
+ "input_dir": "path/to/input",
135
+ "map_files": {
136
+ "MyCallerOutput.tsv": {
137
+ "MY_CALLER": {
138
+ "caller_name": "My Caller",
139
+ "fields": { ... },
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ parser = AdvancedAnalysisParser(request)
146
+ result = parser.run(return_dict=True)
147
+ print(result)
148
+
149
+ ````
150
+
151
+ ### Command-Line Usage
152
+
153
+ 1. Create a config file, e.g. `config.json` (see below).
154
+ 2. Run:
155
+
156
+ ```bash
157
+ python -m AdvancedAnalysisFileParser.AdvancedAnalysisParser --input-dir <input_dir> --output-dir <output_dir> --input-files <file1> <file2> --output-json <output_json>
158
+ ````
159
+
160
+ Or with a config file:
161
+
162
+ ```bash
163
+ python -m AdvancedAnalysisFileParser.AdvancedAnalysisParser -c config.json
164
+ ```
165
+
166
+ You can override config values with CLI arguments for flexible context modification.
167
+
168
+ This will write the unified JSON to `output_json` under `output_dir`.
169
+
170
+ ---
171
+
172
+ ## Configuration JSON
173
+
174
+ Top‐level JSON must include:
175
+
176
+ | Key | Type | Description |
177
+ | ------------- | ------ | --------------------------------------------------------------------- |
178
+ | `output_json` | string | Filename for the generated JSON (default: `adv_analysis_output.json`) |
179
+ | `input_dir` | string | Directory containing all input files |
180
+ | `map_files` | object | Mapping of filenames → caller definitions |
181
+
182
+ ### `map_files` Structure
183
+
184
+ ```jsonc
185
+ "map_files": {
186
+ "<filename.tsv|.json>": {
187
+ "<CALLER_KEY>": {
188
+ "caller_name": "<Human-readable name>",
189
+
190
+ // Option A: per-field warnings
191
+ "fields": {
192
+ "<FieldName>": {
193
+ "Warning": {
194
+ "type": "condition",
195
+ "conditions": [
196
+ {
197
+ "operator": "GT",
198
+ "value": 10,
199
+ "message": "Value > 10"
200
+ }
201
+ ]
202
+ }
203
+ }
204
+ }
205
+
206
+ // Option B: whole-caller warning (no "fields" key)
207
+ "Warning": {
208
+ "type": "condition",
209
+ "conditions": [ ... ]
210
+ }
211
+ },
212
+ /* repeat for other callers in the same file */
213
+ }
214
+ }
215
+ ```
216
+
217
+ #### TSV Caller Example (MSI/TMB/GIS)
218
+
219
+ ```json
220
+ {
221
+ "TruSightOncology500\\sample__CombinedVariantOutput.tsv": {
222
+ "MSI": {
223
+ "caller_name": "Percent Unstable MSI Sites",
224
+ "fields": {
225
+ "Usable MSI Sites": {
226
+ "Warning": {
227
+ "type": "condition",
228
+ "conditions": [
229
+ { "operator": "GT", "value": 10, "message": "MSI>10 detected" }
230
+ ]
231
+ }
232
+ }
233
+ }
234
+ },
235
+ "TMB": {
236
+ "caller_name": "Total TMB",
237
+ "fields": {
238
+ "Total TMB": {
239
+ "Warning": {
240
+ "type": "condition",
241
+ "conditions": [
242
+ { "operator": "GT", "value": 10, "message": "TMB>10 detected" }
243
+ ]
244
+ }
245
+ }
246
+ }
247
+ },
248
+ "GIS": {
249
+ "caller_name": "Genomic Instability Score",
250
+ "fields": {
251
+ "Genomic Instability Score": {
252
+ "Warning": {
253
+ "type": "condition",
254
+ "conditions": [
255
+ { "operator": "GT", "value": 42, "message": "GIS>42 detected" }
256
+ ]
257
+ }
258
+ }
259
+ }
260
+ }
261
+ }
262
+ }
263
+ ```
264
+
265
+ #### Boolean-Flag Caller Example (GBA/SMN)
266
+
267
+ ```json
268
+ {
269
+ "SRR1289…gba.tsv": {
270
+ "GBA": {
271
+ "caller_name": "GBA Special Caller",
272
+ "Warning": {
273
+ "type": "condition",
274
+ "disease_name": "Gaucher disease",
275
+ "conditions": [
276
+ {
277
+ "field": "is_carrier",
278
+ "operator": "EQ",
279
+ "value": true,
280
+ "message": "Based on the GBA Caller, this sample is positive for Gaucher disease"
281
+ },
282
+ {
283
+ "field": "is_biallelic",
284
+ "operator": "EQ",
285
+ "value": true,
286
+ "message": "Based on the GBA Caller, this sample is positive for Gaucher disease"
287
+ }
288
+ ]
289
+ }
290
+ }
291
+ }
292
+ }
293
+ ```
294
+
295
+ #### Genotype-Mapping Example (HBA)
296
+
297
+ ```json
298
+ {
299
+ "…targeted.json": {
300
+ "hba": {
301
+ "caller_name": "HBA Special Caller",
302
+ "Warning": {
303
+ "type": "genotype",
304
+ "phenotypeGenotypeMapping": {
305
+ "silent carrier": ["-a3.7/aa", "-a4.2/aa"],
306
+ "carrier": ["--/aaa3.7", "--/aaa4.2"],
307
+ "positive for hemoglobin H disease": ["--/-a3.7", "--/-a4.2"]
308
+ }
309
+ }
310
+ }
311
+ }
312
+ }
313
+ ```
314
+
315
+ ---
316
+
317
+ ## Warning Types
318
+
319
+ ### `condition`
320
+
321
+ - Evaluates one or more **FieldCondition** entries
322
+ - Each condition must specify:
323
+
324
+ - `field` (optional for per-field; required for whole-caller)
325
+ - `operator`: one of `EQ`, `NE`, `GT`, `LT`, etc.
326
+ - `EQ`: Equals (`a == b`)
327
+ - `NE`: Not Equals (`a != b`)
328
+ - `GT`: Greater then (`a > b`)
329
+ - `LT`: Less then (`a < b`)
330
+ - `GE`: Greater then or equal (`a >= b`)
331
+ - `LE`: Less then or equal (`a <= b`)
332
+ - `CONTAINS`: Equals (`b in a`)
333
+ - `value`: comparison target
334
+ - `message`: text to emit if triggered
335
+
336
+ ### `genotype`
337
+
338
+ - Maps raw genotypes → phenotype labels
339
+ - First matching genotype string in `phenotypeGenotypeMapping` is used
340
+
341
+ ---
342
+
343
+ ## Running Tests
344
+
345
+ We use `pytest` and parametrize via in-memory JSON contexts.
346
+
347
+ Sample snippet from `tests/test_parser.py`:
348
+
349
+ ```python
350
+ import pytest
351
+ from AdvancedAnalysisFileParser import JsonDict, AdvancedAnalysisParser
352
+
353
+ TEST_CONTEXTS = [ { "request": { … }, "expected": { … } } ]
354
+
355
+ @pytest.mark.parametrize("context", TEST_CONTEXTS)
356
+ def test_parser_in_memory(context: JsonDict):
357
+ parser = AdvancedAnalysisParser(context["request"])
358
+ result = parser.run(return_dict=True)
359
+ assert result["MSI"]["warning"] == "MSI>10 detected"
360
+ # … more assertions …
361
+ ```
362
+
363
+ ---
364
+
365
+ ## AdvancedAnalysisFile Properties
366
+
367
+ | JSON Name | Type | Required? |
368
+ | --------- | ----------------------------- | --------- |
369
+ | LPA | AdvancedAnalysis<LpaData> | No |
370
+ | SMN1 | AdvancedAnalysis<Smn1Data> | No |
371
+ | SMN | AdvancedAnalysis<SmnData> | No |
372
+ | HBA | AdvancedAnalysis<HbaData> | No |
373
+ | RH | AdvancedAnalysis<RhData> | No |
374
+ | CYP2D6 | AdvancedAnalysis<Cyp2bData> | No |
375
+ | CYP2B6 | AdvancedAnalysis<Cyp2bData> | No |
376
+ | CYP21A2 | AdvancedAnalysis<Cyp21a2Data> | No |
377
+ | GBA | AdvancedAnalysis<GbaData> | No |
378
+ | TMB | AdvancedAnalysis<TmbData> | No |
379
+ | GIS | AdvancedAnalysis<GisData> | No |
380
+ | MSI | AdvancedAnalysis<MsiData> | No |
381
+ | HRD | AdvancedAnalysis<HrdData> | No |
382
+
383
+ ---
384
+
385
+ ## Common Wrapper
386
+
387
+ ### AdvancedAnalysis<T>
388
+
389
+ | JSON Name | Type | Required? |
390
+ | --------- | ------ | --------- |
391
+ | data | T | No |
392
+ | Warning | string | No |
393
+
394
+ ---
395
+
396
+ ## Data Models
397
+
398
+ ### LpaData
399
+
400
+ | JSON Name | Type | Required? |
401
+ | ------------------------- | ------------- | --------- |
402
+ | kiv2CopyNumber | double | Yes |
403
+ | refMarkerAlleleCopyNumber | double? | No |
404
+ | altMarkerAlleleCopyNumber | double? | No |
405
+ | type | LpaType | Yes |
406
+ | variants | List<Variant> | Yes |
407
+
408
+ ---
409
+
410
+ ### Smn1Data
411
+
412
+ | JSON Name | Type | Required? |
413
+ | ------------------ | ------ | --------- |
414
+ | #Sample | string | Yes |
415
+ | isSMA | bool | Yes |
416
+ | isCarrier | bool | Yes |
417
+ | SMN1_CN | double | No |
418
+ | SMN2_CN | double | No |
419
+ | SMN2delta7-8_CN | int | Yes |
420
+ | Total_CN_raw | double | Yes |
421
+ | Full_length_CN_raw | double | Yes |
422
+ | SMN1_CN_raw | string | Yes |
423
+
424
+ ---
425
+
426
+ ### SmnData
427
+
428
+ | JSON Name | Type | Required? |
429
+ | --------------------- | ------------- | --------- |
430
+ | smn1CopyNumber | double? | Yes |
431
+ | smn2CopyNumber | double? | Yes |
432
+ | smn2Delta78CopyNumber | int | Yes |
433
+ | totalCopyNumber | double | Yes |
434
+ | fullLengthCopyNumber | double | No |
435
+ | variants | List<Variant> | Yes |
436
+
437
+ ---
438
+
439
+ ### HbaData
440
+
441
+ | JSON Name | Type | Required? |
442
+ | -------------- | -------------- | --------- |
443
+ | genotype | string | Yes |
444
+ | genotypeFilter | GenotypeFilter | Yes |
445
+ | genotypeQual | double | Yes |
446
+ | minPValue | double | Yes |
447
+ | variants | List<Variant> | Yes |
448
+
449
+ ---
450
+
451
+ ### RhData
452
+
453
+ | JSON Name | Type | Required? |
454
+ | --------------- | ------------- | --------- |
455
+ | totalCopyNumber | int | Yes |
456
+ | rhdCopyNumber | int | Yes |
457
+ | rhceCopyNumber | int | Yes |
458
+ | variants | List<Variant> | Yes |
459
+
460
+ ---
461
+
462
+ ### Cyp2bData
463
+
464
+ | JSON Name | Type | Required? |
465
+ | ------------------------ | -------------- | --------- |
466
+ | genotype | string | Yes |
467
+ | genotypeFilter | GenotypeFilter | Yes |
468
+ | pharmcatDescription | string | No |
469
+ | pharmcatMetabolismStatus | string | No |
470
+
471
+ ---
472
+
473
+ ### Cyp21a2Data
474
+
475
+ | JSON Name | Type | Required? |
476
+ | --------------------------- | ------------- | --------- |
477
+ | totalCopyNumber | int | Yes |
478
+ | deletionBreakpointInGene | bool? | No |
479
+ | recombinantHaplotypes | List<string> | No |
480
+ | recombinantHaplotypesFilter | string | No |
481
+ | variants | List<Variant> | Yes |
482
+
483
+ `recombinantHaplotypesFilter` was added by DRAGEN 4.5 (GAN-9024) — quality status of the
484
+ recombinant haplotype call, e.g. `"PASS"`. A non-`PASS` value may indicate inconsistency between
485
+ the haplotype and supporting depth evidence. Absent for pre-4.5 DRAGEN output.
486
+
487
+ ---
488
+
489
+ ### GbaData
490
+
491
+ | JSON Name | Type | Required? |
492
+ | ------------------------------- | ------ | --------- |
493
+ | #Sample | string | Yes |
494
+ | is_biallelic | bool | Yes |
495
+ | is_carrier | bool | Yes |
496
+ | total_CN | int | Yes |
497
+ | deletion_breakpoint_in_GBA_gene | string | No |
498
+ | recombinant_variants | string | No |
499
+ | other_variants | string | No |
500
+
501
+ ---
502
+
503
+ ### TmbData
504
+
505
+ | JSON Name | Type | Required? |
506
+ | --------- | ------ | --------- |
507
+ | Total TMB | double | Yes |
508
+
509
+ ---
510
+
511
+ ### GisData
512
+
513
+ | JSON Name | Type | Required? |
514
+ | ------------------------- | ------ | --------- |
515
+ | Genomic Instability Score | int | No |
516
+ | Tumor Fraction | double | No |
517
+ | Ploidy | double | No |
518
+
519
+ ---
520
+
521
+ ### MsiData
522
+
523
+ | JSON Name | Type | Required? |
524
+ | -------------------------- | ------ | --------- |
525
+ | Percent Unstable MSI Sites | double | Yes |
526
+
527
+ ---
528
+
529
+ ### HrdData
530
+
531
+ | JSON Name | Type | Required? |
532
+ | --------- | ---- | --------- |
533
+ | HRD Score | int | Yes |
534
+
535
+ ---
536
+
537
+ ### Variant
538
+
539
+ | JSON Name | Type | Required? |
540
+ | -------------------- | ------ | --------- |
541
+ | hgvs | string | No |
542
+ | qual | double | No |
543
+ | altCopyNumber | int | No |
544
+ | altCopyNumberQuality | double | No |
545
+
546
+ ---
547
+
548
+ ## Contributing
549
+
550
+ 1. Fork
551
+ 2. Create feature branch
552
+ 3. Submit PR
553
+
554
+ Please follow existing style and add tests for new parser logic.
555
+ Bar Cohen
556
+
557
+ ### **Additional Help & Support**:
558
+
559
+ For any troubleshooting or questions, feel free to contact [support@geneyx.com](mailto:support@geneyx.com).
560
+
561
+ ## License
562
+
563
+ Copyright (c) 2025 GeneyX Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
564
+
565
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
566
+
567
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
568
+
569
+ ```
570
+
571
+
572
+ ```
@@ -0,0 +1,19 @@
1
+ # Generated by tools/generate_stubs.py - do not edit.
2
+ # The implementation ships compiled; this file is the published surface.
3
+
4
+ from .IWarning import IWarning
5
+ from ..Models import *
6
+
7
+
8
+ class CarrierPositiveWarning(IWarning):
9
+ def format(self, config: JsonDict, data: JsonDict) -> str:
10
+ """Generate a warning message for carrier/positive status based on conditions.
11
+
12
+ Args:
13
+ config (JsonDict): Configuration dict with 'conditions' (list of dicts).
14
+ data (JsonDict): Data dict to check conditions against.
15
+
16
+ Returns:
17
+ str: Warning message if a condition is met, else empty string.
18
+ """
19
+ ...
@@ -0,0 +1,28 @@
1
+ # Generated by tools/generate_stubs.py - do not edit.
2
+ # The implementation ships compiled; this file is the published surface.
3
+
4
+ from .IWarning import IWarning
5
+ from ..Models import JsonDict, FieldCondition, ConditionOperator
6
+
7
+
8
+ class ConditionWarning(IWarning):
9
+ def format(self, config: JsonDict, data: JsonDict) -> str:
10
+ """Generate warning messages based on a list of conditions.
11
+
12
+ Args:
13
+ config (JsonDict): Configuration dictionary. Must contain a "conditions" key with a list of dicts,
14
+ each representing a FieldCondition (keys: operator, value, message, field [optional]).
15
+ data (JsonDict): Data dictionary to check conditions against. If a condition specifies a field, that field's value is used.
16
+
17
+ Returns:
18
+ str: Concatenated warning messages for all triggered conditions, separated by ". ". Returns an empty string if no conditions are met.
19
+
20
+ Example config:
21
+ config = {
22
+ "conditions": [
23
+ {"operator": "GT", "value": 10, "message": "Value is too high", "field": "score"},
24
+ {"operator": "EQ", "value": 0, "message": "Value is zero"}
25
+ ]
26
+ }
27
+ """
28
+ ...
@@ -0,0 +1,19 @@
1
+ # Generated by tools/generate_stubs.py - do not edit.
2
+ # The implementation ships compiled; this file is the published surface.
3
+
4
+ from .IWarning import IWarning
5
+ from ..Models import JsonDict
6
+
7
+
8
+ class GbaWarning(IWarning):
9
+ def format(self, config: JsonDict, data: JsonDict) -> str:
10
+ """Generate a warning message for GBA gene analysis (e.g., Gaucher disease risk).
11
+
12
+ Args:
13
+ config (JsonDict): Configuration dict with keys like 'caller_name', 'disease_name'.
14
+ data (JsonDict): Data dict with keys like 'recombinantHaplotypes', 'variants'.
15
+
16
+ Returns:
17
+ str: Warning message if a relevant condition is met, else empty string.
18
+ """
19
+ ...
@@ -0,0 +1,19 @@
1
+ # Generated by tools/generate_stubs.py - do not edit.
2
+ # The implementation ships compiled; this file is the published surface.
3
+
4
+ from .IWarning import IWarning
5
+ from ..Models import JsonDict
6
+
7
+
8
+ class GenotypeWarning(IWarning):
9
+ def format(self, config: JsonDict, data: JsonDict) -> str:
10
+ """Generate a warning message based on genotype-to-phenotype mapping.
11
+
12
+ Args:
13
+ config (JsonDict): Configuration dict with mapping info.
14
+ data (JsonDict): Data dict with genotype info.
15
+
16
+ Returns:
17
+ str: Warning message if mapping found, else empty string.
18
+ """
19
+ ...
@@ -0,0 +1,10 @@
1
+ # Generated by tools/generate_stubs.py - do not edit.
2
+ # The implementation ships compiled; this file is the published surface.
3
+
4
+ from abc import ABC, abstractmethod
5
+ from ..Models import JsonDict
6
+
7
+
8
+ class IWarning(ABC):
9
+ def format(self, config: JsonDict, data: JsonDict) -> str:
10
+ ...