File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,11 @@ class SeqrValidationError(Exception):
19
19
20
20
21
21
def validate_allele_type (
22
- mt : hl .MatrixTable ,
22
+ t : hl . Table | hl .MatrixTable ,
23
23
dataset_type : DatasetType ,
24
24
** _ : Any ,
25
25
) -> None :
26
- ht = mt .rows ()
26
+ ht = t .rows () if isinstance ( t , hl . MatrixTable ) else t
27
27
ht = ht .filter (
28
28
dataset_type .invalid_allele_types .contains (
29
29
hl .numeric_allele_type (ht .alleles [0 ], ht .alleles [1 ]),
@@ -42,12 +42,12 @@ def validate_allele_type(
42
42
43
43
44
44
def validate_no_duplicate_variants (
45
- mt : hl .MatrixTable ,
45
+ t : hl . Table | hl .MatrixTable ,
46
46
reference_genome : ReferenceGenome ,
47
47
dataset_type : DatasetType ,
48
48
** _ : Any ,
49
49
) -> None :
50
- ht = mt .rows ()
50
+ ht = t .rows () if isinstance ( t , hl . MatrixTable ) else t
51
51
ht = ht .group_by (* ht .key ).aggregate (n = hl .agg .count ())
52
52
ht = ht .filter (ht .n > 1 )
53
53
ht = ht .select ()
You can’t perform that action at this time.
0 commit comments