From 80cbca6263fbf6a348584d89b5152f426b242d39 Mon Sep 17 00:00:00 2001 From: Martijn Vermaat <martijn@vermaat.name> Date: Thu, 29 Mar 2012 09:31:49 +0000 Subject: [PATCH] More Crossmap tests git-svn-id: https://humgenprojects.lumc.nl/svn/mutalyzer/trunk@501 eb6bd6ab-9ccd-42b9-aceb-e2899b4a52f1 --- tests/test_crossmap.py | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/tests/test_crossmap.py b/tests/test_crossmap.py index 2350695e..ce3d81d4 100644 --- a/tests/test_crossmap.py +++ b/tests/test_crossmap.py @@ -256,33 +256,46 @@ class TestCrossmap(): assert_equal(cm.tuple2string(cm.g2x(2123)), '-156-u23752936') assert_equal(cm.tuple2string(cm.g2x(2124)), '-156-u23752935') - def test_cds_start_on_splice_site_more(self): + def test_cds_start_on_splice_site_reverse(self): """ - Test a gene some more that has a CDS that starts on an exon splice - site. + Test a gene on the reverse strand that has a CDS that starts on an + exon splice site. """ - rna = [23755059, 23755214, 23777833, 23778028, 23808749, 23808851, 23824768, - 23824856, 23853497, 23853617, 23869553, 23869626, 23894775, 23894899, + rna = [23777833, 23778028, 23808749, 23808851, 23824768, 23824856, + 23853497, 23853617, 23869553, 23869626, 23894775, 23894899, 23898506, 23899304] + cds = [23755214, 23778028] + cm = Crossmap(rna, cds, -1) + assert_equal(cm._Crossmap__crossmapping, + [196, 1, -1, -103, -104, -192, -193, -313, -314, -387, + -388, -512, -513, -1311]) + + def test_cds_start_on_splice_site_other(self): + """ + Test a gene that has a CDS that starts on an other exon splice site. + """ + rna = [23755059, 23755214, 23777833, 23778028, 23808749, 23808851, + 23824768, 23824856, 23853497, 23853617, 23869553, 23869626, + 23894775, 23894899, 23898506, 23899304] cds = [23755214, 23898680] cm = Crossmap(rna, cds, 1) assert_equal(cm._Crossmap__crossmapping, - [-155, 1, 2, 197, 198, 300, 301, 389, 390, - 510, 511, 584, 585, 709, 710, 1508]) + [-155, 1, 2, 197, 198, 300, 301, 389, 390, 510, 511, 584, + 585, 709, 710, 1508]) - def test_cds_start_on_splice_site_reverse(self): + def test_cds_start_on_splice_site_other_reverse(self): """ Test a gene on the reverse strand that has a CDS that starts on an - exon splice site. + other exon splice site. """ rna = [23777833, 23778028, 23808749, 23808851, 23824768, 23824856, 23853497, 23853617, 23869553, 23869626, 23894775, 23894899, 23898506, 23899304] - cds = [23755214, 23778028] + cds = [23755214, 23808749] cm = Crossmap(rna, cds, -1) assert_equal(cm._Crossmap__crossmapping, - [196, 1, -1, -103, -104, -192, -193, -313, -314, -387, - -388, -512, -513, -1311]) + [197, 2, 1, -102, -103, -191, -192, -312, -313, -386, + -387, -511, -512, -1310]) def test_cds_start_on_transcript_start(self): """ -- GitLab