Skip to content

Commit 8400d3f

Browse files
committed
Merge branch 'main' of github.com:broadinstitute/seqr-loading-pipelines into benb/migration2
2 parents 239e869 + c17dc72 commit 8400d3f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

v03_pipeline/lib/methods/sex_check.py

Lines changed: 4 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
)
@@ -24,7 +25,9 @@
2425
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.
27-
mt = mt.filter_rows(hl.is_snp(mt.alleles[0], mt.alleles[1]))
28+
mt = mt.filter_rows(
29+
(hl.len(mt.alleles) == BIALLELIC) & hl.is_snp(mt.alleles[0], mt.alleles[1]),
30+
)
2831

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

v03_pipeline/lib/tasks/write_project_family_tables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def __init__(self, *args, **kwargs):
3838
self.dynamic_write_family_table_tasks = set()
3939

4040
def complete(self) -> bool:
41-
return len(self.dynamic_write_family_table_tasks) > 1 and all(
41+
return len(self.dynamic_write_family_table_tasks) >= 1 and all(
4242
write_family_table_task.complete()
4343
for write_family_table_task in self.dynamic_write_family_table_tasks
4444
)

0 commit comments

Comments
 (0)