AdvancedAnalysisFileParser 0.1.4__cp312-cp312-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.
- AdvancedAnalysisFileParser/AdvancedAnalysisConstants.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/AdvancedAnalysisConstants.pyi +13 -0
- AdvancedAnalysisFileParser/AdvancedAnalysisParser.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/AdvancedAnalysisParser.pyi +95 -0
- AdvancedAnalysisFileParser/HG002.paraphase.json +128289 -0
- AdvancedAnalysisFileParser/Models/ConditionOperator.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Models/ConditionOperator.pyi +14 -0
- AdvancedAnalysisFileParser/Models/FieldCondition.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Models/FieldCondition.pyi +30 -0
- AdvancedAnalysisFileParser/Models/FieldWarningConfig.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Models/FieldWarningConfig.pyi +9 -0
- AdvancedAnalysisFileParser/Models/JsonDict.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Models/JsonDict.pyi +6 -0
- AdvancedAnalysisFileParser/Models/SectionConfig.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Models/SectionConfig.pyi +12 -0
- AdvancedAnalysisFileParser/Models/__init__.py +13 -0
- AdvancedAnalysisFileParser/Parsers/AdvancedAnalysisFileParserFactory.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Parsers/AdvancedAnalysisFileParserFactory.pyi +15 -0
- AdvancedAnalysisFileParser/Parsers/DragenTruSightOncology500TSVParser.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Parsers/DragenTruSightOncology500TSVParser.pyi +17 -0
- AdvancedAnalysisFileParser/Parsers/IAdvancedAnalysisFileParser.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Parsers/IAdvancedAnalysisFileParser.pyi +45 -0
- AdvancedAnalysisFileParser/Parsers/JsonSectionParser.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Parsers/JsonSectionParser.pyi +14 -0
- AdvancedAnalysisFileParser/Parsers/OneLineTsvParser.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Parsers/OneLineTsvParser.pyi +12 -0
- AdvancedAnalysisFileParser/Parsers/__init__.py +7 -0
- AdvancedAnalysisFileParser/README.md +572 -0
- AdvancedAnalysisFileParser/Warnings/CarrierPositiveWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/CarrierPositiveWarning.pyi +19 -0
- AdvancedAnalysisFileParser/Warnings/ConditionWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/ConditionWarning.pyi +28 -0
- AdvancedAnalysisFileParser/Warnings/GbaWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/GbaWarning.pyi +19 -0
- AdvancedAnalysisFileParser/Warnings/GenotypeWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/GenotypeWarning.pyi +19 -0
- AdvancedAnalysisFileParser/Warnings/IWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/IWarning.pyi +10 -0
- AdvancedAnalysisFileParser/Warnings/SmnWarning.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/SmnWarning.pyi +19 -0
- AdvancedAnalysisFileParser/Warnings/WarningFactory.cp312-win_amd64.pyd +0 -0
- AdvancedAnalysisFileParser/Warnings/WarningFactory.pyi +16 -0
- AdvancedAnalysisFileParser/Warnings/__init__.py +7 -0
- AdvancedAnalysisFileParser/__init__.py +18 -0
- AdvancedAnalysisFileParser/dragen_500_tsv_config.json +53 -0
- AdvancedAnalysisFileParser/dragen_targeted_config.json +96 -0
- AdvancedAnalysisFileParser/gba_tsv_config.json +23 -0
- AdvancedAnalysisFileParser/pacbio_paraphase_config.json +176 -0
- AdvancedAnalysisFileParser/py.typed +0 -0
- AdvancedAnalysisFileParser/smn_tsv_config.json +23 -0
- advancedanalysisfileparser-0.1.4.dist-info/METADATA +158 -0
- advancedanalysisfileparser-0.1.4.dist-info/RECORD +56 -0
- advancedanalysisfileparser-0.1.4.dist-info/WHEEL +5 -0
- advancedanalysisfileparser-0.1.4.dist-info/entry_points.txt +3 -0
- advancedanalysisfileparser-0.1.4.dist-info/licenses/LICENSE +9 -0
- advancedanalysisfileparser-0.1.4.dist-info/top_level.txt +1 -0
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from enum import Enum
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class ConditionOperator(Enum):
|
|
8
|
+
EQ: str
|
|
9
|
+
NE: str
|
|
10
|
+
GT: str
|
|
11
|
+
LT: str
|
|
12
|
+
GE: str
|
|
13
|
+
LE: str
|
|
14
|
+
CONTAINS: str
|
|
Binary file
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from typing import Any, Callable, Dict, Optional
|
|
5
|
+
from .ConditionOperator import ConditionOperator
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FieldCondition:
|
|
9
|
+
def __init__(self, operator: ConditionOperator, value: Any, message: str, field: Optional[str]=None):
|
|
10
|
+
"""Create a condition to check a field value against a target value using an operator.
|
|
11
|
+
|
|
12
|
+
Args:
|
|
13
|
+
operator (ConditionOperator): The comparison operator (e.g., EQ, GT, CONTAINS).
|
|
14
|
+
value (Any): The value to compare against.
|
|
15
|
+
message (str): Message to return if the condition is met.
|
|
16
|
+
field (Optional[str]): Name of the field to check (optional, for context).
|
|
17
|
+
"""
|
|
18
|
+
...
|
|
19
|
+
def check(self, value: Any) -> bool:
|
|
20
|
+
"""Check if the provided value satisfies the condition.
|
|
21
|
+
|
|
22
|
+
Args:
|
|
23
|
+
value (Any): The value to check.
|
|
24
|
+
|
|
25
|
+
Returns:
|
|
26
|
+
bool: True if the condition is met, False otherwise.
|
|
27
|
+
"""
|
|
28
|
+
...
|
|
29
|
+
|
|
30
|
+
OPERATOR_FUNCS: Dict[ConditionOperator, Callable[[Any, Any], bool]]
|
|
Binary file
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from .FieldCondition import FieldCondition
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class FieldWarningConfig:
|
|
9
|
+
warning: Optional[FieldCondition]
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from typing import Optional, Dict
|
|
6
|
+
from .FieldCondition import FieldCondition
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@dataclass
|
|
10
|
+
class SectionConfig:
|
|
11
|
+
include_all_fields: bool
|
|
12
|
+
fields: Optional[Dict[str, FieldCondition]]
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from .JsonDict import JsonDict
|
|
2
|
+
from .FieldCondition import FieldCondition
|
|
3
|
+
from .ConditionOperator import ConditionOperator
|
|
4
|
+
from .FieldWarningConfig import FieldWarningConfig
|
|
5
|
+
from .SectionConfig import SectionConfig
|
|
6
|
+
|
|
7
|
+
__all__ = [
|
|
8
|
+
"JsonDict",
|
|
9
|
+
"ConditionOperator",
|
|
10
|
+
"SectionConfig",
|
|
11
|
+
"FieldCondition",
|
|
12
|
+
"FieldWarningConfig"
|
|
13
|
+
]
|
|
Binary file
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from .IAdvancedAnalysisFileParser import IAdvancedAnalysisFileParser
|
|
5
|
+
from .DragenTruSightOncology500TSVParser import DragenTruSightOncology500TSVParser
|
|
6
|
+
from .OneLineTsvParser import OneLineTsvParser
|
|
7
|
+
from .JsonSectionParser import JsonSectionParser
|
|
8
|
+
from ..Models import JsonDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AdvancedAnalysisFileParserFactory:
|
|
12
|
+
"""Returns the correct IParser implementation based on file path."""
|
|
13
|
+
@staticmethod
|
|
14
|
+
def get_parser(file_path: str) -> IAdvancedAnalysisFileParser:
|
|
15
|
+
...
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
import csv
|
|
5
|
+
import logging
|
|
6
|
+
from typing import Dict, Any, List, Optional, Union, Tuple
|
|
7
|
+
from .IAdvancedAnalysisFileParser import IAdvancedAnalysisFileParser
|
|
8
|
+
from ..Models import JsonDict, SectionConfig
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class DragenTruSightOncology500TSVParser(IAdvancedAnalysisFileParser):
|
|
12
|
+
"""Parser for CombinedVariantOutput TSV.
|
|
13
|
+
Reads only configured sections and fields, streaming parse inside loader.
|
|
14
|
+
"""
|
|
15
|
+
def parse(self) -> JsonDict:
|
|
16
|
+
"""Entry point: prepare section configs and delegate to loader-parsing function."""
|
|
17
|
+
...
|
|
Binary file
|
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
import os
|
|
6
|
+
from pathlib import Path
|
|
7
|
+
from typing import Any
|
|
8
|
+
from ..Warnings import IWarning
|
|
9
|
+
from AdvancedAnalysisFileParser.AdvancedAnalysisConstants import AdvancedAnalysisConstants
|
|
10
|
+
from AdvancedAnalysisFileParser.Warnings.WarningFactory import WarningFactory
|
|
11
|
+
from ..Models import JsonDict
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class IAdvancedAnalysisFileParser(ABC):
|
|
15
|
+
section_config: JsonDict
|
|
16
|
+
file_config: JsonDict
|
|
17
|
+
def __init__(self, section_config: JsonDict, file_path: str) -> None:
|
|
18
|
+
"""Initialize a file parser for advanced analysis.
|
|
19
|
+
|
|
20
|
+
Args:
|
|
21
|
+
section_config (JsonDict): Section configuration for parsing.
|
|
22
|
+
file_path (str): Path to the file to parse (must be .json or .tsv).
|
|
23
|
+
|
|
24
|
+
Raises:
|
|
25
|
+
ValueError: If file_path is empty or not a string.
|
|
26
|
+
FileNotFoundError: If the file does not exist.
|
|
27
|
+
"""
|
|
28
|
+
...
|
|
29
|
+
def parse(self) -> JsonDict:
|
|
30
|
+
"""Parse the file and return its data as a JsonDict.
|
|
31
|
+
|
|
32
|
+
Returns:
|
|
33
|
+
JsonDict: Parsed data from the file.
|
|
34
|
+
"""
|
|
35
|
+
...
|
|
36
|
+
def build_result(self, data: JsonDict) -> JsonDict:
|
|
37
|
+
"""Build a result dictionary from parsed data and section config.
|
|
38
|
+
|
|
39
|
+
Args:
|
|
40
|
+
data (JsonDict): Parsed data from the file.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
JsonDict: Result dictionary with formatted values and warnings.
|
|
44
|
+
"""
|
|
45
|
+
...
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
import json
|
|
5
|
+
from .IAdvancedAnalysisFileParser import IAdvancedAnalysisFileParser
|
|
6
|
+
from ..Models import JsonDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class JsonSectionParser(IAdvancedAnalysisFileParser):
|
|
10
|
+
"""Parse JSON files with a specific section into a unified format.
|
|
11
|
+
The section is specified by the 'json_key' or 'caller_key' in the config.
|
|
12
|
+
"""
|
|
13
|
+
def parse(self) -> JsonDict:
|
|
14
|
+
...
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Generated by tools/generate_stubs.py - do not edit.
|
|
2
|
+
# The implementation ships compiled; this file is the published surface.
|
|
3
|
+
|
|
4
|
+
from typing import Any
|
|
5
|
+
from .IAdvancedAnalysisFileParser import IAdvancedAnalysisFileParser
|
|
6
|
+
from ..Models import JsonDict
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class OneLineTsvParser(IAdvancedAnalysisFileParser):
|
|
10
|
+
is_tsv_parser: bool
|
|
11
|
+
def parse(self) -> JsonDict:
|
|
12
|
+
...
|