Skip to content

Commit 8fe59fd

Browse files
committed
lint
1 parent 25dd70f commit 8fe59fd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

v03_pipeline/lib/methods/sex_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
AMBIGUOUS_THRESHOLD_PERC: float = 0.01 # Fraction of samples identified as "ambiguous_sex" above which an error will be thrown.
1515
AAF_THRESHOLD: float = 0.05 # Alternate allele frequency threshold for `hl.impute_sex`.
16+
BIALLELIC: int = 2
1617
XX_FSTAT_THRESHOLD: float = (
1718
0.5 # F-stat threshold below which a sample will be called XX
1819
)
@@ -25,7 +26,7 @@ def call_sex(mt: hl.MatrixTable) -> hl.Table:
2526
# Filter to SNVs and biallelics
2627
# NB: We should already have filtered biallelics, but just in case.
2728
mt = mt.filter_rows(
28-
((hl.len(mt.alleles) == 2) & hl.is_snp(mt.alleles[0], mt.alleles[1]))
29+
(hl.len(mt.alleles) == BIALLELIC) & hl.is_snp(mt.alleles[0], mt.alleles[1]),
2930
)
3031

3132
# Filter to PASS variants only (variants with empty or missing filter set)

0 commit comments

Comments
 (0)