Skip to content
Snippets Groups Projects
Commit 0a9f0f38 authored by Vermaat's avatar Vermaat
Browse files

Merge pull request #65 from mutalyzer/synonymous-p-is

Fix bug in recognizing p.(=)
parents 89ff6172 6435f0cf
No related branches found
No related tags found
No related merge requests found
......@@ -439,14 +439,14 @@ def in_frame_description(s1, s2):
@todo: More intelligently handle longest_common_prefix().
@todo: Refactor this code (too many return statements).
"""
s1 = s1.rstrip('*')
s2 = s2.rstrip('*')
if s1 == s2:
# Nothing happened.
return ('p.(=)', 0, 0, 0)
s2_stop = '*' in s2
s1 = s1.rstrip('*')
s2 = s2.rstrip('*')
lcp = len(longest_common_prefix(s1, s2))
lcs = len(longest_common_suffix(s1[lcp:], s2[lcp:]))
s1_end = len(s1) - lcs
......
......@@ -1349,3 +1349,11 @@ class TestVariantchecker(MutalyzerTest):
"""
check_variant('NM_000193.2:c.1388_1389insC', self.output)
assert 'NM_000193.2(SHH_i001):p.(*463Cysext*?)' in self.output.getOutput('protDescriptions')
@fix(cache('AB026906.1'))
def test_synonymous_p_is(self):
"""
Synonymous mutation should yield a p.(=) description.
"""
check_variant('AB026906.1:c.276C>T', self.output)
assert 'AB026906.1(SDHD_i001):p.(=)' in self.output.getOutput('protDescriptions')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment