예제 #1
0
def save_pdf(report_name, table):
    if not qconfig.draw_plots:
        return

    all_rows = get_all_rows_out_of_table(table)

    column_widths = [0] * (len(all_rows[0]['values']) + 1)
    for row in all_rows:
        for i, cell in enumerate([row['metricName']] +
                                 _mapme(val_to_str, row['values'])):
            column_widths[i] = max(column_widths[i], len(cell))

    if qconfig.min_contig:
        extra_info = 'All statistics are based on contigs of size >= %d bp, unless otherwise noted ' % qconfig.min_contig +\
                     '\n(e.g., "# contigs (>= 0 bp)" and "Total length (>= 0 bp)" include all contigs).'
    else:
        extra_info = ''
    table_to_draw = []
    for row in all_rows:
        table_to_draw.append([
            '%s' % cell
            for cell in [row['metricName']] + _mapme(val_to_str, row['values'])
        ])
    from quast_libs import plotter
    plotter.draw_report_table(report_name, extra_info, table_to_draw,
                              column_widths)
예제 #2
0
def save_pdf(report_name, table):
    if not qconfig.draw_plots:
        return

    all_rows = get_all_rows_out_of_table(table)

    column_widths = [0] * (len(all_rows[0]['values']) + 1)
    for row in all_rows:
        for i, cell in enumerate([row['metricName']] + _mapme(val_to_str, row['values'])):
            column_widths[i] = max(column_widths[i], len(cell))

    if qconfig.min_contig:
        extra_info = 'All statistics are based on contigs of size >= %d bp, unless otherwise noted ' % qconfig.min_contig +\
                     '\n(e.g., "# contigs (>= 0 bp)" and "Total length (>= 0 bp)" include all contigs).'
    else:
        extra_info = ''
    table_to_draw = []
    for row in all_rows:
        table_to_draw.append(['%s' % cell for cell
            in [row['metricName']] + _mapme(val_to_str, row['values'])])
    from quast_libs import plotter
    plotter.draw_report_table(report_name, extra_info, table_to_draw, column_widths)