@MainWrapper<EOL>def main(sample_id, fastq_pair, max_len, kmer, opts, clear, disable_rr):
logger.info("<STR_LIT>")<EOL>min_coverage, min_kmer_coverage = opts<EOL>logger.info("<STR_LIT>")<EOL>kmers = set_kmers(kmer, max_len)<EOL>logger.info("<STR_LIT>".format(kmers))<EOL>cli = [<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>"<STR_LIT>",<EOL>min_coverage,<EOL>"<STR_LIT>",<EOL>"<STR_LIT:.>"<EOL>]<EOL>if kmers:<EOL><INDENT>cli += ["<STR_LIT>".format("<STR_LIT:U+002C>".join([str(x) for x in kmers]))]<EOL><DEDENT>cli += [<EOL>"<STR_LIT>",<EOL>fastq_pair[<NUM_LIT:0>],<EOL>"<STR_LIT>",<EOL>fastq_pair[<NUM_LIT:1>]<EOL>]<EOL>if disable_rr == '<STR_LIT:true>':<EOL><INDENT>cli += ['<STR_LIT>']<EOL><DEDENT>logger.debug("<STR_LIT>".format(cli))<EOL>p = subprocess.Popen(cli, stdout=PIPE, stderr=PIPE)<EOL>stdout, stderr = p.communicate()<EOL>try:<EOL><INDENT>stderr = stderr.decode("<STR_LIT:utf8>")<EOL>stdout = stdout.decode("<STR_LIT:utf8>")<EOL><DEDENT>except (UnicodeDecodeError, AttributeError):<EOL><INDENT>stderr = str(stderr)<EOL>stdout = str(stdout)<EOL><DEDENT>logger.info("<STR_LIT>"<EOL>"<STR_LIT>".format(stdout))<EOL>logger.info("<STR_LIT>"<EOL>"<STR_LIT>".format(stderr))<EOL>logger.info("<STR_LIT>".format(<EOL>p.returncode))<EOL>with open("<STR_LIT>", "<STR_LIT:w>") as fh:<EOL><INDENT>if p.returncode != <NUM_LIT:0>:<EOL><INDENT>fh.write("<STR_LIT:error>")<EOL>sys.exit(p.returncode)<EOL><DEDENT>else:<EOL><INDENT>fh.write("<STR_LIT>")<EOL><DEDENT><DEDENT>if "<STR_LIT>" in fastq_pair[<NUM_LIT:0>]:<EOL><INDENT>sample_id += "<STR_LIT>"<EOL><DEDENT>info = __get_version_spades()<EOL>assembly_file = "<STR_LIT>".format(<EOL>sample_id, info["<STR_LIT:version>"].replace("<STR_LIT:.>", "<STR_LIT>"))<EOL>os.rename("<STR_LIT>", assembly_file)<EOL>logger.info("<STR_LIT>".format(assembly_file))<EOL>if clear == "<STR_LIT:true>" and os.path.exists(assembly_file):<EOL><INDENT>clean_up(fastq_pair)<EOL><DEDENT>
Main executor of the spades template.

    Parameters
    ----------
    sample_id : str
        Sample Identification string.
    fastq_pair : list
        Two element list containing the paired FastQ files.
    max_len : int
        Maximum read length. This value is determined in
        :py:class:`templates.integrity_coverage`
    kmer : str
        Can be either ``'auto'``, ``'default'`` or a
        sequence of space separated integers, ``'23, 45, 67'``.
    opts : List of options for spades execution. See above.
    clear : str
        Can be either 'true' or 'false'. If 'true', the input fastq files will
        be removed at the end of the run, IF they are in the working directory
    disable_rr : str
        Can either be 'true' or 'false'. If 'true', disables repeat resolution 
        stage of assembling