File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments