svphaser 2.0.2__py3-none-any.whl → 2.0.6__py3-none-any.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.
svphaser/_version.py CHANGED
@@ -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.2'
32
- __version_tuple__ = version_tuple = (2, 0, 2)
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.25,
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
- gt = "1|0"
65
- elif r2 >= major_delta:
66
- gt = "0|1"
67
- elif abs(n1 - n2) / total <= equal_delta:
68
- gt = "1|1"
69
- else:
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: svphaser
3
- Version: 2.0.2
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
@@ -1,16 +1,16 @@
1
1
  svphaser/__init__.py,sha256=ytsjARd0ZTn3FbN2BEvpPXygBwQyLiQZ5VB2SyXKL18,2485
2
2
  svphaser/__main__.py,sha256=lWe9boXc4JIpJEknv9dXqSsjS1Glk_FnYV9eBzUEzA0,86
3
- svphaser/_version.py,sha256=UFd-y4dR-HVHWzUJlgmJ3T05hh9C4Q-la-D9QTIoZw0,704
3
+ svphaser/_version.py,sha256=bTAFMFvMAxBeOekZBtqvKDMVXKX-jvNDCL0lbfqDCt0,704
4
4
  svphaser/cli.py,sha256=Qbo0IPsm6_Uhj2Ri_fuqX4NJlxC9APl70rtM0vOU4jk,5335
5
5
  svphaser/logging.py,sha256=yw7Z8az-sZL-x4qhvPmu7aGVLbhSOYiSdrNqCO8bVtw,841
6
6
  svphaser/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  svphaser/phasing/__init__.py,sha256=RcXg2EGc7Dyuq8wDP-bJmtVNKs8f3YqByjTel0mMujM,464
8
8
  svphaser/phasing/_workers.py,sha256=C7YKx9YYq8stoyMeVQsmEnMgTqulALCjWHhhAWb1MQ8,2862
9
- svphaser/phasing/algorithms.py,sha256=9UetPSi5BDCvvhmCn8t1ia08lupqTOI-68azwK46hek,1745
9
+ svphaser/phasing/algorithms.py,sha256=EEc2_ix7v8Z4d_dO2yOdgPvxTAM6ekWo0X0bDyvFjyI,1810
10
10
  svphaser/phasing/io.py,sha256=RXsCJb88zPB1tAHhlQ2tT3kHo-inD-tsQTCyWNUzM7o,9029
11
11
  svphaser/phasing/types.py,sha256=b0K9ORyuwv3O1VbCm_ml1nLpQQv_dJsMKO8p4uTRn4k,814
12
- svphaser-2.0.2.dist-info/METADATA,sha256=7kPl92IMR91GItQ_24ZDgGr8ITh8j5UAeqvZKz3TdRE,6430
13
- svphaser-2.0.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
- svphaser-2.0.2.dist-info/entry_points.txt,sha256=YFeRJLvcvTc4dazgyVOg3HJ4fNrvBrVDaPX6ULapqeU,46
15
- svphaser-2.0.2.dist-info/licenses/LICENSE,sha256=qsY5iOcewwIwvhQbj7naSP6tpJAc05Mv0DfhrouPoBU,1102
16
- svphaser-2.0.2.dist-info/RECORD,,
12
+ svphaser-2.0.6.dist-info/METADATA,sha256=cT_9pJI-1dRJwVWt_ULrr8TlNZPpr7AJK6BB0A8EOyo,6430
13
+ svphaser-2.0.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ svphaser-2.0.6.dist-info/entry_points.txt,sha256=YFeRJLvcvTc4dazgyVOg3HJ4fNrvBrVDaPX6ULapqeU,46
15
+ svphaser-2.0.6.dist-info/licenses/LICENSE,sha256=qsY5iOcewwIwvhQbj7naSP6tpJAc05Mv0DfhrouPoBU,1102
16
+ svphaser-2.0.6.dist-info/RECORD,,