Skip to content

Commit 61267b4

Browse files
committed
Fix string parsing
1 parent f5756b4 commit 61267b4

File tree

1 file changed

+5
-1
lines changed
  • v03_pipeline/lib/annotations

1 file changed

+5
-1
lines changed

v03_pipeline/lib/annotations/mito.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ def common_low_heteroplasmy(ht: hl.Table, **_: Any) -> hl.Expression:
1919

2020

2121
def contamination(mt: hl.MatrixTable, **_: Any) -> hl.Expression:
22-
return hl.parse_float64(mt.contamination)
22+
return (
23+
hl.parse_float64(mt.contamination)
24+
if mt.contamination.dtype == hl.tstr
25+
else mt.contamination
26+
)
2327

2428

2529
def DP(mt: hl.MatrixTable, **_: Any) -> hl.Expression: # noqa: N802

0 commit comments

Comments
 (0)