Skip to content

Commit

Permalink
Filter invalid alleles
Browse files Browse the repository at this point in the history
  • Loading branch information
bpblanken committed Nov 28, 2024
1 parent 75c23e7 commit 96dce61
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions v03_pipeline/lib/reference_datasets/hmtvar.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import hail as hl
import requests

from v03_pipeline.lib.model.dataset_type import DatasetType
from v03_pipeline.lib.model.definitions import ReferenceGenome


Expand All @@ -21,4 +22,9 @@ def get_ht(
score=ht.disease_score,
)
ht = ht.key_by('locus', 'alleles')
ht = ht.filter(
~DatasetType.SNV_INDEL.invalid_allele_types.contains(
hl.numeric_allele_type(ht.alleles[0], ht.alleles[1]),
),
)
return ht.group_by(*ht.key).aggregate(score=hl.agg.max(ht.score))

0 comments on commit 96dce61

Please sign in to comment.