2 Created on Aug 23, 2010
7 from erange import rnaEditing
10 class TestRnaEditing(unittest.TestCase):
21 def testGetGenesWithMultipleSNPs(self):
23 self.assertEquals([], rnaEditing.getGenesWithMultipleSNPs(snpList))
25 snpList = [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, "snp1"],
26 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, "snp2"],
27 [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, "snp3"]
30 result = ["snp3", "snp2", "snp1"]
31 self.assertEquals(result, rnaEditing.getGenesWithMultipleSNPs(snpList))
33 self.assertEquals(result, rnaEditing.getGenesWithMultipleSNPs(snpList, minCount=2))
35 snpList.append([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, "snp3"])
37 self.assertEquals(result, rnaEditing.getGenesWithMultipleSNPs(snpList, minCount=2))
41 suite = unittest.TestSuite()
42 suite.addTest(unittest.makeSuite(TestRnaEditing))
47 if __name__ == "__main__":
48 #import sys;sys.argv = ['', 'Test.testName']