def filter_using_summary(fq, args):
data = {entry[<NUM_LIT:0>]: entry[<NUM_LIT:1>] for entry in process_summary(<EOL>summaryfile=args.summary,<EOL>threads="<STR_LIT>",<EOL>readtype=args.readtype,<EOL>barcoded=False)[<EOL>["<STR_LIT>", "<STR_LIT>"]].itertuples(index=False)}<EOL>try:<EOL><INDENT>for record in SeqIO.parse(fq, "<STR_LIT>"):<EOL><INDENT>if data[record.id] > args.qualityand args.length <= len(record) <= args.maxlength:<EOL><INDENT>print(record[args.headcrop:args.tailcrop].format("<STR_LIT>"), end="<STR_LIT>")<EOL><DEDENT><DEDENT><DEDENT>except KeyError:<EOL><INDENT>logging.error("<STR_LIT>".format(record.id))<EOL>sys.exit('<STR_LIT>'.format(record.id))<EOL><DEDENT>
Use quality scores from albacore summary file for filtering

    Use the summary file from albacore for more accurate quality estimate
    Get the dataframe from nanoget, convert to dictionary