From 455ae1e2499fc05b2f6da4f8f830b25c8e58d25a Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Thu, 15 Nov 2012 09:07:33 +0000 Subject: [PATCH] Some unit tests for mtDNA position converter git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@639 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1 --- tests/test_mapping.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/test_mapping.py b/tests/test_mapping.py index 084cd96e..8a9390bf 100644 --- a/tests/test_mapping.py +++ b/tests/test_mapping.py @@ -211,3 +211,28 @@ class TestConverter(): converter = self._converter('hg19') coding = converter.chrom2c('NC_000011.9:g.111959695delGinsTAAA', 'list') assert 'NM_003002.2:c.274delinsTAAA' in coding + + def test_chrm_chrom2c(self): + """ + Mitochondrial m. to c. + """ + converter = self._converter('hg19') + coding = converter.chrom2c('NC_012920.1:m.12030del', 'list') + assert 'NC_012920.1(ND4_v001):c.1271del' in coding + + def test_chrm_name_chrom2c(self): + """ + Mitochondrial m. (by chromosome name) to c. + """ + converter = self._converter('hg19') + variant = converter.correctChrVariant('chrM:m.12030del') + coding = converter.chrom2c(variant, 'list') + assert 'NC_012920.1(ND4_v001):c.1271del' in coding + + def test_chrm_c2chrom(self): + """ + Mitochondrial c. to m. + """ + converter = self._converter('hg19') + genomic = converter.c2chrom('NC_012920.1(ND4_v001):c.1271del') + assert_equal(genomic, 'NC_012920.1:m.12030del') -- GitLab