def test_non_specific_error(self): b1 = Breakpoint(REF_CHR, 740, 745, strand=STRAND.POS, orient=ORIENT.RIGHT) b2 = Breakpoint(REF_CHR, 747, strand=STRAND.POS, orient=ORIENT.LEFT) bpp = BreakpointPair(b1, b2) with pytest.raises(AttributeError): bpp.breakpoint_sequence_homology(REFERENCE_GENOME)
def test_left_pos_right_pos(self): b1 = Breakpoint(REF_CHR, 157, strand=STRAND.POS, orient=ORIENT.LEFT) b2 = Breakpoint(REF_CHR, 1788, strand=STRAND.POS, orient=ORIENT.RIGHT) bpp = BreakpointPair(b1, b2) assert bpp.breakpoint_sequence_homology(REFERENCE_GENOME) == ('CAATGC', '') b1 = Breakpoint(REF_CHR, 589, strand=STRAND.POS, orient=ORIENT.LEFT) b2 = Breakpoint(REF_CHR, 704, strand=STRAND.POS, orient=ORIENT.RIGHT) bpp = BreakpointPair(b1, b2) assert bpp.breakpoint_sequence_homology(REFERENCE_GENOME) == ('TTAA', 'ATAGC')
def test_close_del(self): # ....TT|TT.... b1 = Breakpoint(REF_CHR, 1001, strand=STRAND.POS, orient=ORIENT.LEFT) b2 = Breakpoint(REF_CHR, 1002, strand=STRAND.POS, orient=ORIENT.RIGHT) bpp = BreakpointPair(b1, b2) self.assertEqual(('', ''), bpp.breakpoint_sequence_homology(REFERENCE_GENOME))
def test_right_neg_right_pos(self): # CCC|AAA ------------ TTT|GGG # GGG GGG # AAA AAA b1 = Breakpoint(REF_CHR, 1460, strand=STRAND.NEG, orient=ORIENT.RIGHT) b2 = Breakpoint(REF_CHR, 2915, strand=STRAND.POS, orient=ORIENT.RIGHT) bpp = BreakpointPair(b1, b2) assert bpp.breakpoint_sequence_homology(REFERENCE_GENOME) == ('AAA', 'GGG')
def test_left_neg_left_pos(self): # CCC|AAA ------------ TTT|GGG # CCC CCC # TTT TTT b1 = Breakpoint(REF_CHR, 1459, strand=STRAND.NEG, orient=ORIENT.LEFT) b2 = Breakpoint(REF_CHR, 2914, strand=STRAND.POS, orient=ORIENT.LEFT) bpp = BreakpointPair(b1, b2) assert bpp.breakpoint_sequence_homology(REFERENCE_GENOME) == ('CCC', 'TTT')
def test_close_dup(self): # ....GATACATTTCTTCTTGAAAA... # -------------<============= # ===============>----------- # -------------CT-CT--------- first break homology # ------------T--T----------- second break homology b1 = Breakpoint(REF_CHR, 745, strand=STRAND.POS, orient=ORIENT.RIGHT) b2 = Breakpoint(REF_CHR, 747, strand=STRAND.POS, orient=ORIENT.LEFT) bpp = BreakpointPair(b1, b2) assert bpp.breakpoint_sequence_homology(REFERENCE_GENOME) == ('CT', 'TT')