diff --git a/mutalyzer/variantchecker.py b/mutalyzer/variantchecker.py index d438e6c7a76b2a494c2cc5331e33b0c9f2056bbe..c905aff409d763fbbf48ffba199f22e090c86ea2 100644 --- a/mutalyzer/variantchecker.py +++ b/mutalyzer/variantchecker.py @@ -1137,7 +1137,7 @@ def process_raw_variant(mutator, variant, record, transcript, output): # Deletion or duplication. if variant.MutationType in ['del', 'dup']: # The fuzzy flags are to support deletions of the form c.a-?_b+?del. - first_fuzzy = variant.StartLoc.PtLoc.Offset == '?' + first_fuzzy = variant.StartLoc and variant.StartLoc.PtLoc.Offset == '?' last_fuzzy = variant.EndLoc and variant.EndLoc.PtLoc.Offset == '?' apply_deletion_duplication(first, last, variant.MutationType, mutator, record, output, first_fuzzy=first_fuzzy, diff --git a/tests/test_variantchecker.py b/tests/test_variantchecker.py index 76e0d0e65bd30bc5fec24b6bbb56cf6a70bc933e..247d32838f927715306e600432b61072fe70f807 100644 --- a/tests/test_variantchecker.py +++ b/tests/test_variantchecker.py @@ -435,3 +435,11 @@ class TestVariantchecker(): check_variant('NM_003002.2:c.274G>T', self.output) assert_equal(self.output.getIndexedOutput('rawVariantsChromosomal', 0), ('chr11', '+', [('274G>T', (111959695, 111959695))])) + + def test_ex_notation(self): + """ + Variant description using EX notation should not crash but deletion of + one exon should delete two splice sites. + """ + check_variant('NM_002001.2:c.EX1del', self.output) + assert_equal(len(self.output.getMessagesWithErrorCode('IDELSPLICE')), 1)