@MainWrapper<EOL>def main(sample_id, assembly_file, coverage_bp_file=None):
logger.info("<STR_LIT>")<EOL>assembly_obj = Assembly(assembly_file, sample_id)<EOL>logger.info("<STR_LIT>")<EOL>assembly_obj.get_summary_stats("<STR_LIT>".format(sample_id))<EOL>size_dist = [len(x) for x in assembly_obj.contigs.values()]<EOL>json_dic = {<EOL>"<STR_LIT>": [{<EOL>"<STR_LIT>": sample_id,<EOL>"<STR_LIT:data>": [<EOL>{"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:value>": assembly_obj.summary_info["<STR_LIT>"],<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": True},<EOL>{"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT:value>": assembly_obj.summary_info["<STR_LIT>"],<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": True},<EOL>]<EOL>}],<EOL>"<STR_LIT>": [{<EOL>"<STR_LIT>": sample_id,<EOL>"<STR_LIT:data>": {<EOL>"<STR_LIT>": size_dist<EOL>}<EOL>}]<EOL>}<EOL>if coverage_bp_file:<EOL><INDENT>try:<EOL><INDENT>window = <NUM_LIT><EOL>gc_sliding_data = assembly_obj.get_gc_sliding(window=window)<EOL>cov_sliding_data =assembly_obj.get_coverage_sliding(coverage_bp_file,<EOL>window=window)<EOL>total_bp = sum(<EOL>[sum(x) for x in assembly_obj.contig_coverage.values()]<EOL>)<EOL>json_dic["<STR_LIT>"][<NUM_LIT:0>]["<STR_LIT:data>"]["<STR_LIT>"] = {<EOL>"<STR_LIT>": gc_sliding_data,<EOL>"<STR_LIT>": cov_sliding_data,<EOL>"<STR_LIT>": window,<EOL>"<STR_LIT>": assembly_obj._get_window_labels(window),<EOL>"<STR_LIT>": os.path.basename(assembly_file)<EOL>}<EOL>json_dic["<STR_LIT>"][<NUM_LIT:0>]["<STR_LIT:data>"]["<STR_LIT>"] = total_bp<EOL><DEDENT>except:<EOL><INDENT>logger.error("<STR_LIT>"<EOL>"<STR_LIT:{}>".format(traceback.format_exc()))<EOL><DEDENT><DEDENT>with open("<STR_LIT>", "<STR_LIT:w>") as json_report:<EOL><INDENT>json_report.write(json.dumps(json_dic, separators=("<STR_LIT:U+002C>", "<STR_LIT::>")))<EOL><DEDENT>with open("<STR_LIT>", "<STR_LIT:w>") as status_fh:<EOL><INDENT>status_fh.write("<STR_LIT>")<EOL><DEDENT>
Main executor of the assembly_report template.

    Parameters
    ----------
    sample_id : str
        Sample Identification string.
    assembly_file : str
        Path to assembly file in Fasta format.