Skip to content

Commit 4a5e890

Browse files
committed
Filter to biallelics
1 parent 55afc95 commit 4a5e890

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

v03_pipeline/lib/methods/sex_check.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
def call_sex(mt: hl.MatrixTable) -> hl.Table:
2525
# Filter to SNVs and biallelics
2626
# NB: We should already have filtered biallelics, but just in case.
27-
mt = mt.filter_rows(hl.is_snp(mt.alleles[0], mt.alleles[1]))
27+
mt = mt.filter_rows(
28+
((hl.len(mt.alleles) == 2) & hl.is_snp(mt.alleles[0], mt.alleles[1]))
29+
)
2830

2931
# Filter to PASS variants only (variants with empty or missing filter set)
3032
mt = mt.filter_rows(

0 commit comments

Comments
 (0)