Ejemplo n.º 1
0
 def test_parse_residues_diff_base(self):
     """parse_residues: should work with diff base and unpaired_symbol"""
     lines = RES_LINES_DIFF_BASE.split('\n')
     exp_seq = 'CAGACU'
     exp_pairs = [(1,5),(2,4)]
     obs = parse_residues(lines, num_base=3, unpaired_symbol='xxx')
     self.assertEqual(obs, (exp_seq, exp_pairs))
Ejemplo n.º 2
0
 def test_parse_residues_diff_base(self):
     """parse_residues: should work with diff base and unpaired_symbol"""
     lines = RES_LINES_DIFF_BASE.split('\n')
     exp_seq = 'CAGACU'
     exp_pairs = [(1,5),(2,4)]
     obs = parse_residues(lines, num_base=3, unpaired_symbol='xxx')
     self.assertEqual(obs, (exp_seq, exp_pairs))
Ejemplo n.º 3
0
 def test_parse_residues(self):
     """parse_residues: should work on valid data
     """
     lines = RES_LINES.split("\n")
     exp_seq = "UGGUAAUACGUUGCGAAGCC"
     exp_pairs = [(2, 8), (3, 7), (4, 11), (5, 10), (6, 9), (12, 18), (13, 17)]
     self.assertEqual(parse_residues(lines, num_base=1, unpaired_symbol="0"), (exp_seq, exp_pairs))
Ejemplo n.º 4
0
 def test_parse_residues(self):
     """parse_residues: should work on valid data
     """
     lines = RES_LINES.split('\n')
     exp_seq = 'UGGUAAUACGUUGCGAAGCC'
     exp_pairs = [(2,8),(3,7),(4,11),(5,10),(6,9),(12,18),(13,17)]
     self.assertEqual(parse_residues(lines, num_base=1,\
         unpaired_symbol='0'), (exp_seq, exp_pairs))