def test_Two_Insertions_Consecutive(self): # Two insertions at position 1 and 2. data = "T[-/A][-/G]GACACGTACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.1insA'), Snp('.2insG')] self.assertEqual(snps, expected)
def test_One_Insertion(self): # Insertion of 'A' at position 1. data = "T[-/A]GACACGTACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.1insA')] self.assertEqual(snps, expected)
def test_Two_Substitutions(self): # Substitution at position 5 and 6. data = "TGACA[C/G][G/A]TACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.5C>G'), Snp('.6G>A')] self.assertEqual(snps, expected)
def test_Substitution(self): # Substitution at position 5. data = "TGACA[C/G]GTACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.5C>G')] self.assertEqual(snps, expected)
def test_Two_Deletions(self): # Two deletions at positions 0 and 6. data = "[T/-]GACAC[G/-]TACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.0del'), Snp('.6del')] expected[0].ref_nucleotide = 'T' expected[1].ref_nucleotide = 'G' self.assertEqual(snps, expected)
def test_Two_Insertions(self): # Allele1: TGACACGTACGT # Insertion of 'A' at position 1 and # Insertion of 'G' at position 6. data = "T[-/A]GACA[-/G]CGTACGT" parser = SnpSequence(data) snps = parser.snps() expected = [Snp('.1insA'), Snp('.6insG')] self.assertEqual(snps, expected)
def test_NoSnps(self): data = "TGACACGTACGT" parser = SnpSequence(data) snps = parser.snps() self.assertEqual(len(snps), 0)