def test_left(self): chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('G]10:198982]') self.assertEqual('10', chrom) self.assertEqual(198982, pos) self.assertEqual(ORIENT.LEFT, orient1) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('', seq) self.assertEqual('G', ref) chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt(']10:198982]G') self.assertEqual('10', chrom) self.assertEqual(198982, pos) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('', seq) self.assertEqual('G', ref)
def test_alternate_chrom(self): chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('G]GL000.01:198982]') self.assertEqual('GL000.01', chrom) self.assertEqual(198982, pos) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('', seq) self.assertEqual('G', ref)
def test_right(self): # '[4:190898243[AGGT' chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('[4:190898243[A') self.assertEqual('4', chrom) self.assertEqual(190898243, pos) self.assertEqual(ORIENT.RIGHT, orient1) self.assertEqual(ORIENT.RIGHT, orient2) self.assertEqual('', seq) self.assertEqual('A', ref)
def test_left_untemp_seq(self): chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt(']11:123456]AGTNNNCAT') self.assertEqual('11', chrom) self.assertEqual(123456, pos) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('AGTNNNCA', seq) self.assertEqual('T', ref) chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt(']8:1682443]TGC') self.assertEqual('8', chrom) self.assertEqual(1682443, pos) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('TG', seq) self.assertEqual('C', ref) chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('AAGTG]11:66289601]') self.assertEqual('11', chrom) self.assertEqual(66289601, pos) self.assertEqual(ORIENT.LEFT, orient2) self.assertEqual('AGTG', seq) self.assertEqual('A', ref)
def test_right_untemp_seq(self): chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('[5:190898243[AGGT') self.assertEqual('5', chrom) self.assertEqual(190898243, pos) self.assertEqual(ORIENT.RIGHT, orient1) self.assertEqual(ORIENT.RIGHT, orient2) self.assertEqual('AGG', seq) self.assertEqual('T', ref) chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('CAGTNNNCA[5:190898243[') self.assertEqual('5', chrom) self.assertEqual(190898243, pos) self.assertEqual(ORIENT.LEFT, orient1) self.assertEqual(ORIENT.RIGHT, orient2) self.assertEqual('AGTNNNCA', seq) self.assertEqual('C', ref) chrom, pos, orient1, orient2, ref, seq = _parse_bnd_alt('CTG[21:47575965[') self.assertEqual('21', chrom) self.assertEqual(47575965, pos) self.assertEqual(ORIENT.LEFT, orient1) self.assertEqual(ORIENT.RIGHT, orient2) self.assertEqual('TG', seq) self.assertEqual('C', ref)