Skip to content

Commit 48e3738

Browse files
authored
Merge branch 'master' into GH993-fix-contig-shadowing
2 parents 2e16422 + c5a3b19 commit 48e3738

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

malariagen_data/anoph/fst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ def average_fst(
363363
region: base_params.region,
364364
cohort1_query: base_params.sample_query,
365365
cohort2_query: base_params.sample_query,
366-
sample_query_options: Optional[base_params.sample_query] = None,
366+
sample_query_options: Optional[base_params.sample_query_options] = None,
367367
sample_sets: Optional[base_params.sample_sets] = None,
368368
cohort_size: Optional[base_params.cohort_size] = fst_params.cohort_size_default,
369369
min_cohort_size: Optional[

malariagen_data/veff.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,21 @@ def _get_within_intron_effect(base_effect, intron):
548548
effect = base_effect._replace(effect="INTRONIC", impact="MODIFIER")
549549

550550
else:
551-
# TODO intronic INDELs and MNPs
552-
effect = base_effect._replace(effect="TODO intronic indels and MNPs")
551+
# INDELs and MNPs — use the closest edge of the variant to the splice site
552+
if strand == "+":
553+
dist_5prime = ref_start - (intron_start - 1)
554+
dist_3prime = -(ref_stop - (intron_stop + 1))
555+
else:
556+
dist_5prime = (intron_stop + 1) - ref_stop
557+
dist_3prime = -((intron_start - 1) - ref_start)
558+
559+
indel_min_dist = min(dist_5prime, dist_3prime)
560+
561+
if indel_min_dist <= 2:
562+
effect = base_effect._replace(effect="SPLICE_CORE", impact="HIGH")
563+
elif indel_min_dist <= 7:
564+
effect = base_effect._replace(effect="SPLICE_REGION", impact="MODERATE")
565+
else:
566+
effect = base_effect._replace(effect="INTRONIC", impact="MODIFIER")
553567

554568
return effect

0 commit comments

Comments
 (0)