From 8c9faf2b513fb148406dda561320660629ce1202 Mon Sep 17 00:00:00 2001 From: Brendan ODonnell Date: Wed, 20 Dec 2023 15:19:01 -0500 Subject: [PATCH] Add tests for dups spanning boundary --- tests/data/cache-py3.hdp | Bin 994870 -> 994960 bytes tests/test_hgvs_assemblymapper.py | 16 ++++++++++++++++ tests/test_hgvs_variantmapper.py | 10 ++++++++++ 3 files changed, 26 insertions(+) diff --git a/tests/data/cache-py3.hdp b/tests/data/cache-py3.hdp index e9b29e46356d1e5ce541fa0fdc1bd9133e635793..fc436e742b6e965f97a3d0c2bd9586964e5bd297 100644 GIT binary patch delta 121 zcmdmX$7aG^n}!y~7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QQX~-^CdxZvP?9ZzCp} z!K~RhMI&ok2?K+d)T~Lo-Qjgi)-F*tO{I^>``5!Hz?(IVdUs delta 50 zcmbPm*Jj%tn}!y~7N!>F7M2#)7Pc1l7LFFq7OocV7M>Q~7QQX~-^CftxBn35w-IA1 G)dK*_6cBCz diff --git a/tests/test_hgvs_assemblymapper.py b/tests/test_hgvs_assemblymapper.py index 25953bf3..2942f035 100644 --- a/tests/test_hgvs_assemblymapper.py +++ b/tests/test_hgvs_assemblymapper.py @@ -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)" @@ -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)" diff --git a/tests/test_hgvs_variantmapper.py b/tests/test_hgvs_variantmapper.py index a28fdfc5..704301c0 100644 --- a/tests/test_hgvs_variantmapper.py +++ b/tests/test_hgvs_variantmapper.py @@ -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): @@ -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):