Commit 1b7c9c03 authored by Vermaat's avatar Vermaat
Browse files

Fix del with deleted sequence length as argument

git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@488 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1
parent 78bab4ad
......@@ -149,7 +149,7 @@ def _check_argument(argument, reference, first, last, output):
# If it is a digit (3_9del7 for example), the digit must be equal to
# the length of the given range.
length = int(argument)
interval = first - last + 1
interval = last - first + 1
if length != interval:
output.addMessage(__file__, 3, 'EARGLEN',
'The length (%i) differed from that of the ' \
......
......@@ -527,3 +527,65 @@ class TestVariantchecker():
'UD_127955523176:g.=')
assert 'UD_127955523176(DMD_v001):c.=' \
in self.output.getOutput('descriptions')
def test_deletion_with_sequence_forward_genomic(self):
"""
Specify the deleted sequence in a deletion.
"""
check_variant('AL449423.14:g.65471_65472delTC', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'AL449423.14:g.65471_65472del')
assert 'AL449423.14(CDKN2A_v001):c.98_99del' \
in self.output.getOutput('descriptions')
def test_deletion_with_length_forward_genomic(self):
"""
Specify the deleted sequence length in a deletion.
"""
check_variant('AL449423.14:g.65471_65472del2', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'AL449423.14:g.65471_65472del')
assert 'AL449423.14(CDKN2A_v001):c.98_99del' \
in self.output.getOutput('descriptions')
def test_deletion_with_sequence_reverse_coding(self):
"""
Specify the deleted sequence in a deletion on the reverse strand.
"""
check_variant('AL449423.14(CDKN2A_v001):c.161_163delTGG', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'AL449423.14:g.61937_61939del')
assert 'AL449423.14(CDKN2A_v001):c.161_163del' \
in self.output.getOutput('descriptions')
def test_deletion_with_length_reverse_coding(self):
"""
Specify the deleted sequence length in a deletion on the reverse strand.
"""
check_variant('AL449423.14(CDKN2A_v001):c.161_163del3', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'AL449423.14:g.61937_61939del')
assert 'AL449423.14(CDKN2A_v001):c.161_163del' \
in self.output.getOutput('descriptions')
def test_deletion_with_sequence_reverse_ng_coding(self):
"""
Specify the deleted sequence in a deletion on the reverse strand
using a genomic reference.
"""
check_variant('NG_008939.1:c.155_157delAAC', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'NG_008939.1:g.5206_5208del')
assert 'NG_008939.1(PCCB_v001):c.155_157del' \
in self.output.getOutput('descriptions')
def test_deletion_with_length_reverse_ng_coding(self):
"""
Specify the deleted sequence length in a deletion on the reverse strand
using a genomic reference.
"""
check_variant('NG_008939.1:c.155_157del3', self.output)
assert_equal(self.output.getIndexedOutput('genomicDescription', 0),
'NG_008939.1:g.5206_5208del')
assert 'NG_008939.1(PCCB_v001):c.155_157del' \
in self.output.getOutput('descriptions')
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment