Skip to content

Commit ee1a157

Browse files
committed
Correct type
1 parent 6eb7331 commit ee1a157

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

v03_pipeline/lib/misc/validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ class SeqrValidationError(Exception):
1919

2020

2121
def validate_allele_type(
22-
mt: hl.MatrixTable,
22+
t: hl.Table | hl.MatrixTable,
2323
dataset_type: DatasetType,
2424
**_: Any,
2525
) -> None:
26-
ht = mt.rows()
26+
ht = t.rows() if isinstance(t, hl.MatrixTable) else t
2727
ht = ht.filter(
2828
dataset_type.invalid_allele_types.contains(
2929
hl.numeric_allele_type(ht.alleles[0], ht.alleles[1]),
@@ -42,12 +42,12 @@ def validate_allele_type(
4242

4343

4444
def validate_no_duplicate_variants(
45-
mt: hl.MatrixTable,
45+
t: hl.Table | hl.MatrixTable,
4646
reference_genome: ReferenceGenome,
4747
dataset_type: DatasetType,
4848
**_: Any,
4949
) -> None:
50-
ht = mt.rows()
50+
ht = t.rows() if isinstance(t, hl.MatrixTable) else t
5151
ht = ht.group_by(*ht.key).aggregate(n=hl.agg.count())
5252
ht = ht.filter(ht.n > 1)
5353
ht = ht.select()

0 commit comments

Comments
 (0)