def process_summary(summaryfile, **kwargs):
logging.info("<STR_LIT>".format(<EOL>summaryfile, kwargs["<STR_LIT>"]))<EOL>ut.check_existance(summaryfile)<EOL>if kwargs["<STR_LIT>"] == "<STR_LIT>":<EOL><INDENT>cols = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>elif kwargs["<STR_LIT>"] in ["<STR_LIT>", "<STR_LIT>"]:<EOL><INDENT>cols = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>if kwargs["<STR_LIT>"]:<EOL><INDENT>cols.append("<STR_LIT>")<EOL>logging.info("<STR_LIT>")<EOL><DEDENT>try:<EOL><INDENT>datadf = pd.read_csv(<EOL>filepath_or_buffer=summaryfile,<EOL>sep="<STR_LIT:\t>",<EOL>usecols=cols,<EOL>)<EOL><DEDENT>except ValueError:<EOL><INDENT>logging.error("<STR_LIT>".format(<EOL>summaryfile, '<STR_LIT:U+002CU+0020>'.join(cols)))<EOL>sys.exit("<STR_LIT>".format(<EOL>summaryfile, '<STR_LIT:U+002CU+0020>'.join(cols)))<EOL><DEDENT>if kwargs["<STR_LIT>"]:<EOL><INDENT>datadf.columns = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:time>", "<STR_LIT>",<EOL>"<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>else:<EOL><INDENT>datadf.columns = ["<STR_LIT>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT:time>", "<STR_LIT>", "<STR_LIT>", "<STR_LIT>"]<EOL><DEDENT>logging.info("<STR_LIT>".format(summaryfile))<EOL>return ut.reduce_memory_usage(datadf.loc[datadf["<STR_LIT>"] != <NUM_LIT:0>].copy())<EOL>
Extracting information from an albacore summary file.

    Only reads which have a >0 length are returned.

    The fields below may or may not exist, depending on the type of sequencing performed.
    Fields 1-14 are for 1D sequencing.
    Fields 1-23 for 2D sequencing.
    Fields 24-27, 2-5, 22-23 for 1D^2 (1D2) sequencing
    Fields 28-38 for barcoded workflows
     1  filename
     2  read_id
     3  run_id
     4  channel
     5  start_time
     6  duration
     7  num_events
     8  template_start
     9  num_events_template
    10  template_duration
    11  num_called_template
    12  sequence_length_template
    13  mean_qscore_template
    14  strand_score_template
    15  complement_start
    16    num_events_complement
    17    complement_duration
    18    num_called_complement
    19    sequence_length_complement
    20    mean_qscore_complement
    21    strand_score_complement
    22    sequence_length_2d
    23    mean_qscore_2d
    24    filename1
    25    filename2
    26    read_id1
    27    read_id2
    28    barcode_arrangement
    29    barcode_score
    30    barcode_full_arrangement
    31    front_score
    32    rear_score
    33    front_begin_index
    34    front_foundseq_length
    35    rear_end_index
    36    rear_foundseq_length
    37    kit
    38    variant