Beispiel #1
0
    def test_process_reads_read_obs_paired_end_overlap_1bad_base_qual(self):
        aln1b = pysam.AlignedSegment()
        aln1b.reference_start = 20
        aln1b.query_name = 'read1'
        aln1b.mapping_quality = 20
        aln1b.query_sequence = "AAAAATAAAACAAAAC"
        qqual = [30] * 16
        qqual[0] = 5
        aln1b.query_qualities = qqual
        aln1b.cigarstring = '16M'
        self.alns.append(aln1b)

        var_pos = [15, 20, 25, 35]

        res = preprocess.process_reads(self.alns, var_pos, 20, 10)
        exp = {
            'read1': {
                15: 'T',
                20: 'T',
                25: 'T',
                35: 'C'
            },
            'read2': {
                15: 'G',
                20: 'G',
                25: 'G'
            }
        }
        self.assertEqual(res, exp)
Beispiel #2
0
 def test_process_reads_read_obs_min_base_quality(self):
     res = preprocess.process_reads(self.alns, [15, 20, 25], 20, 30)
     exp = {
         'read1': {
             15: 'T',
             20: 'T',
             25: 'T'
         },
         'read2': {
             20: 'G',
             25: 'G'
         }
     }
     self.assertEqual(res, exp)
Beispiel #3
0
 def test_process_reads_read_obs_simple(self):
     res = preprocess.process_reads(self.alns, [15, 20, 25], 20, 10)
     exp = {
         'read1': {
             15: 'T',
             20: 'T',
             25: 'T'
         },
         'read2': {
             15: 'G',
             20: 'G',
             25: 'G'
         }
     }
     self.assertEqual(res, exp)
Beispiel #4
0
 def test_process_reads_read_obs_min_map_quality(self):
     res = preprocess.process_reads(self.alns, [15, 20, 25], 25, 10)
     exp = {'read1': {15: 'T', 20: 'T', 25: 'T'}}
     self.assertEqual(res, exp)