File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -539,9 +539,19 @@ def _get_within_intron_effect(base_effect, intron):
539539 effect = base_effect ._replace (effect = "INTRONIC" , impact = "MODIFIER" )
540540
541541 else :
542- if intron_min_dist <= 2 :
542+ # INDELs and MNPs — use the closest edge of the variant to the splice site
543+ if strand == "+" :
544+ dist_5prime = ref_start - (intron_start - 1 )
545+ dist_3prime = - (ref_stop - (intron_stop + 1 ))
546+ else :
547+ dist_5prime = (intron_stop + 1 ) - ref_stop
548+ dist_3prime = - ((intron_start - 1 ) - ref_start )
549+
550+ indel_min_dist = min (dist_5prime , dist_3prime )
551+
552+ if indel_min_dist <= 2 :
543553 effect = base_effect ._replace (effect = "SPLICE_CORE" , impact = "HIGH" )
544- elif intron_min_dist <= 7 :
554+ elif indel_min_dist <= 7 :
545555 effect = base_effect ._replace (effect = "SPLICE_REGION" , impact = "MODERATE" )
546556 else :
547557 effect = base_effect ._replace (effect = "INTRONIC" , impact = "MODIFIER" )
You can’t perform that action at this time.
0 commit comments