Skip to content

Commit 96dce61

Browse files
committed
Filter invalid alleles
1 parent 75c23e7 commit 96dce61

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

v03_pipeline/lib/reference_datasets/hmtvar.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import hail as hl
22
import requests
33

4+
from v03_pipeline.lib.model.dataset_type import DatasetType
45
from v03_pipeline.lib.model.definitions import ReferenceGenome
56

67

@@ -21,4 +22,9 @@ def get_ht(
2122
score=ht.disease_score,
2223
)
2324
ht = ht.key_by('locus', 'alleles')
25+
ht = ht.filter(
26+
~DatasetType.SNV_INDEL.invalid_allele_types.contains(
27+
hl.numeric_allele_type(ht.alleles[0], ht.alleles[1]),
28+
),
29+
)
2430
return ht.group_by(*ht.key).aggregate(score=hl.agg.max(ht.score))

0 commit comments

Comments
 (0)