Skip to content

Commit

Permalink
Add tests for dups spanning boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
b0d0nne11 committed Jan 23, 2024
1 parent c9be9db commit 8c9faf2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
Binary file modified tests/data/cache-py3.hdp
Binary file not shown.
16 changes: 16 additions & 0 deletions tests/test_hgvs_assemblymapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,14 @@ def test_c_to_p_with_stop_gain(self):
self.assertEqual(str(var_p), hgvs_p)

def test_map_of_dup_intron_exon_boundary(self):
hgvs_c = "NM_024529.4:c.132-1_132dup"
hgvs_p = "NP_078805.3:p.?"

var_c = self.hp.parse_hgvs_variant(hgvs_c)
var_p = self.am.c_to_p(var_c)

self.assertEqual(str(var_p), hgvs_p)

hgvs_c = "NM_024529.4:c.132-2_132-1dup"
hgvs_p = "NP_078805.3:p.(Thr45GlyfsTer65)"

Expand All @@ -227,6 +235,14 @@ def test_map_of_dup_intron_exon_boundary_rc(self):
self.assertEqual(str(var_p), hgvs_p)

def test_map_of_dup_exon_intron_boundary(self):
hgvs_c = "NM_024529.4:c.130_131+1dup"
hgvs_p = "NP_078805.3:p.?"

var_c = self.hp.parse_hgvs_variant(hgvs_c)
var_p = self.am.c_to_p(var_c)

self.assertEqual(str(var_p), hgvs_p)

hgvs_c = "NM_024529.4:c.131+1_131+3dup"
hgvs_p = "NP_078805.3:p.(Thr45Ter)"

Expand Down
10 changes: 10 additions & 0 deletions tests/test_hgvs_variantmapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ def test_map_of_ins_exon_intron_boundary(self):
self.assertEqual(str(var_p), "NP_004371.2:p.(Phe1085LeufsTer2)")

def test_map_of_dup_intron_exon_boundary(self):
hgvs_c = "NM_024529.4:c.132-1_132dup"
var_c = self.hp.parse_hgvs_variant(hgvs_c)
var_p = self.vm.c_to_p(var_c)
self.assertEqual(str(var_p), "NP_078805.3:p.?")

hgvs_c = "NM_024529.4:c.132-2_132-1dup"
var_c = self.hp.parse_hgvs_variant(hgvs_c)
with self.assertRaises(HGVSError):
Expand All @@ -148,6 +153,11 @@ def test_map_of_dup_intron_exon_boundary_rc(self):
var_p = self.vm.c_to_p(var_c)

def test_map_of_dup_exon_intron_boundary(self):
hgvs_c = "NM_024529.4:c.130_131+1dup"
var_c = self.hp.parse_hgvs_variant(hgvs_c)
var_p = self.vm.c_to_p(var_c)
self.assertEqual(str(var_p), "NP_078805.3:p.?")

hgvs_c = "NM_024529.4:c.131+1_131+3dup"
var_c = self.hp.parse_hgvs_variant(hgvs_c)
with self.assertRaises(HGVSError):
Expand Down

0 comments on commit 8c9faf2

Please sign in to comment.