Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b0d0nne11 committed Jan 23, 2024
1 parent 1b28fa8 commit c9be9db
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/hgvs/utils/altseqbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,10 @@ def _setup_incorporate(self):
if pos.base < 0: # 5' UTR
result = cds_start - 1
else: # cds/intron
if pos.offset <= 0:
result = (cds_start - 1) + pos.base + pos.offset - 1
if pos.offset < 0:
result = (cds_start - 1) + pos.base - 2
else:
result = (cds_start - 1) + pos.base
result = (cds_start - 1) + pos.base - 1
elif pos.datum == Datum.CDS_END: # 3' UTR
result = cds_stop + pos.base - 1
else:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_hgvs_assemblymapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def test_map_of_dup_intron_exon_boundary_rc(self):

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

var_c = self.hp.parse_hgvs_variant(hgvs_c)
var_p = self.am.c_to_p(var_c)
Expand All @@ -237,7 +237,7 @@ def test_map_of_dup_exon_intron_boundary(self):

def test_map_of_dup_exon_intron_boundary_rc(self):
hgvs_c = "NM_004985.4:c.111+1_111+4dup"
hgvs_p = "NP_004976.2:p.(Asp38GlyfsTer11)"
hgvs_p = "NP_004976.2:p.(Asp38ValfsTer11)"

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

0 comments on commit c9be9db

Please sign in to comment.