Esempio n. 1
0
    def test_int_boxplot(self):
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)

        fhand = NamedTemporaryFile(suffix='.png')
        draw_int_boxplot(box, fhand=fhand)
Esempio n. 2
0
    def test_int_boxplot(self):
        box = IntBoxplot()
        box.append(1, 50)
        box.append(1, 40)
        box.append(1, 30)
        box.append(1, 40)
        box.append(2, 30)
        box.append(2, 10)
        box.append(2, 20)
        box.append(2, 40)

        fhand = NamedTemporaryFile(suffix='.png')
        draw_int_boxplot(box, fhand=fhand)
Esempio n. 3
0
def _draw_one_read_pos_stats(stats, axes, box_key, count_key, title):
    axes1 = axes
    xpos = draw_int_boxplot(stats[box_key], axes=axes1)[1]
    axes1.set_ylabel('SNV Qualities')

    axes2 = axes1.twinx()
    ys = zip(*sorted(stats[count_key].items(), key=itemgetter(0)))[1]
    axes2.plot(xpos, ys, c='b')
    axes2.set_ylabel('Num. reads', color='b')
    axes1.set_xlabel('Read position')
    axes1.set_title(title)

    # vertical x labels
    for label in axes1.xaxis.get_ticklabels():
        label.set_rotation(90)
Esempio n. 4
0
def _draw_one_read_pos_stats(stats, axes, box_key, count_key, title):
    axes1 = axes
    xpos = draw_int_boxplot(stats[box_key], axes=axes1)[1]
    axes1.set_ylabel('SNV Qualities')

    axes2 = axes1.twinx()
    ys = zip(*sorted(stats[count_key].items(), key=itemgetter(0)))[1]
    axes2.plot(xpos, ys, c='b')
    axes2.set_ylabel('Num. reads', color='b')
    axes1.set_xlabel('Read position')
    axes1.set_title(title)

    # vertical x labels
    for label in axes1.xaxis.get_ticklabels():
        label.set_rotation(90)