svphaser 2.0.4__tar.gz → 2.0.6__tar.gz
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.
- {svphaser-2.0.4 → svphaser-2.0.6}/PKG-INFO +1 -1
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/_version.py +2 -2
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/phasing/algorithms.py +13 -12
- {svphaser-2.0.4 → svphaser-2.0.6}/.gitignore +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/LICENSE +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/README.md +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/pyproject.toml +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/__init__.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/__main__.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/cli.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/logging.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/phasing/__init__.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/phasing/_workers.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/phasing/io.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/phasing/types.py +0 -0
- {svphaser-2.0.4 → svphaser-2.0.6}/src/svphaser/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: svphaser
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.6
|
|
4
4
|
Summary: Structural-variant phasing from HP-tagged long-read BAMs
|
|
5
5
|
Project-URL: Homepage, https://github.com/your-org/svphaser
|
|
6
6
|
Project-URL: Issues, https://github.com/your-org/svphaser/issues
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '2.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (2, 0,
|
|
31
|
+
__version__ = version = '2.0.6'
|
|
32
|
+
__version_tuple__ = version_tuple = (2, 0, 6)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -46,26 +46,27 @@ def classify_haplotype(
|
|
|
46
46
|
*,
|
|
47
47
|
min_support: int = 10,
|
|
48
48
|
major_delta: float = 0.70,
|
|
49
|
-
equal_delta: float = 0.
|
|
49
|
+
equal_delta: float = 0.10,
|
|
50
50
|
) -> tuple[str, int]:
|
|
51
|
-
"""Return (GT, GQ) using ratio thresholds and an overflow-safe GQ."""
|
|
52
51
|
total = n1 + n2
|
|
53
|
-
|
|
54
52
|
if n1 < min_support and n2 < min_support:
|
|
55
53
|
return "./.", 0
|
|
56
54
|
if total == 0:
|
|
57
55
|
return "./.", 0
|
|
58
56
|
|
|
59
57
|
gq = phasing_gq(n1, n2)
|
|
58
|
+
|
|
59
|
+
# 1) near-tie FIRST → homozygous phased
|
|
60
|
+
if abs(n1 - n2) / total <= equal_delta:
|
|
61
|
+
return "1|1", gq # includes exactly 50/50
|
|
62
|
+
|
|
63
|
+
# 2) strong majority → heterozygous phased
|
|
60
64
|
r1 = n1 / total
|
|
61
65
|
r2 = n2 / total
|
|
62
|
-
|
|
63
66
|
if r1 >= major_delta:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
gt = "./."
|
|
71
|
-
return gt, gq
|
|
67
|
+
return "1|0", gq
|
|
68
|
+
if r2 >= major_delta:
|
|
69
|
+
return "0|1", gq
|
|
70
|
+
|
|
71
|
+
# 3) otherwise ambiguous
|
|
72
|
+
return "./.", gq
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|