Skip to content

Commit

Permalink
Correct type
Browse files Browse the repository at this point in the history
  • Loading branch information
bpblanken committed Nov 27, 2024
1 parent 6eb7331 commit ee1a157
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions v03_pipeline/lib/misc/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ class SeqrValidationError(Exception):


def validate_allele_type(
mt: hl.MatrixTable,
t: hl.Table | hl.MatrixTable,
dataset_type: DatasetType,
**_: Any,
) -> None:
ht = mt.rows()
ht = t.rows() if isinstance(t, hl.MatrixTable) else t
ht = ht.filter(
dataset_type.invalid_allele_types.contains(
hl.numeric_allele_type(ht.alleles[0], ht.alleles[1]),
Expand All @@ -42,12 +42,12 @@ def validate_allele_type(


def validate_no_duplicate_variants(
mt: hl.MatrixTable,
t: hl.Table | hl.MatrixTable,
reference_genome: ReferenceGenome,
dataset_type: DatasetType,
**_: Any,
) -> None:
ht = mt.rows()
ht = t.rows() if isinstance(t, hl.MatrixTable) else t
ht = ht.group_by(*ht.key).aggregate(n=hl.agg.count())
ht = ht.filter(ht.n > 1)
ht = ht.select()
Expand Down

0 comments on commit ee1a157

Please sign in to comment.