svphaser 2.0.1__tar.gz → 2.0.2__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.
@@ -10,3 +10,8 @@ output_*/**/*.csv
10
10
  output_*/**/*.vcf
11
11
  output/**/*.csv
12
12
  output/**/*.vcf
13
+
14
+ # Build artifacts
15
+ /dist/
16
+ /build/
17
+ /*.egg-info/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: svphaser
3
- Version: 2.0.1
3
+ Version: 2.0.2
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.1'
32
- __version_tuple__ = version_tuple = (2, 0, 1)
31
+ __version__ = version = '2.0.2'
32
+ __version_tuple__ = version_tuple = (2, 0, 2)
33
33
 
34
34
  __commit_id__ = commit_id = None
@@ -157,7 +157,7 @@ def _vcf_info_lookup(
157
157
  info_dict[info_key] = v
158
158
  lookup[key] = {
159
159
  "REF": rec.REF,
160
- "ALT": rec.ALT[0] if rec.ALT else "<N>",
160
+ "ALT": ",".join(rec.ALT) if rec.ALT else "<N>",
161
161
  "QUAL": rec.QUAL if rec.QUAL is not None else ".",
162
162
  "FILTER": rec.FILTER if rec.FILTER else "PASS",
163
163
  "INFO": info_dict,
@@ -196,17 +196,18 @@ def _write_headers(
196
196
  out.write("#CHROM\tPOS\tID\tREF\tALT\tQUAL\tFILTER\tINFO\tFORMAT\t" + sample_name + "\n")
197
197
 
198
198
 
199
- def _compose_info_str(
200
- orig_info: dict[str, object],
201
- svtype: object,
202
- gq_label: object,
203
- ) -> str:
199
+ def _compose_info_str(orig_info: dict[str, object], svtype: object, gq_label: object) -> str:
204
200
  """Compose the INFO string with SVTYPE first, original keys (no duplicate), then GQBIN."""
205
201
  items: list[str] = []
206
202
  for k, v in orig_info.items():
207
203
  if k == "SVTYPE":
208
204
  continue
209
205
  items.append(f"{k}={v}")
206
+ # treat boolean True as a FLAG (bare key). Keep everything else as k=v.
207
+ if v is True:
208
+ items.append(k)
209
+ else:
210
+ items.append(f"{k}={v}")
210
211
  if svtype:
211
212
  items.insert(0, f"SVTYPE={svtype}")
212
213
  if gq_label is not None and pd.notnull(gq_label):
File without changes
File without changes
File without changes
File without changes
File without changes