def analyse_repeats(args, run_params, input_assembly, out_folder, log_file, config_file):
    logger.debug('-----Begin repeat analyser log------')
    cmdline = [REPEAT_BIN, 'repeat', '--disjointigs', input_assembly, '--reads', ','.join(args.reads), '--out-dir', out_folder, '--config', config_file, '--log', log_file, '--threads', str(args.threads)]
    if args.debug:
        cmdline.append('--debug')
    if args.meta:
        cmdline.append('--meta')
    if args.keep_haplotypes:
        cmdline.append('--keep-haplotypes')
    cmdline.extend(['--min-ovlp', str(run_params['min_overlap'])])
    if args.hifi_error:
        cmdline.extend(['--extra-params', 'repeat_graph_ovlp_divergence={}'.format(args.hifi_error)])
    try:
        logger.debug(('Running: ' + ' '.join(cmdline)))
        subprocess.check_call(cmdline)
    except subprocess.CalledProcessError as e:
        if (e.returncode == (- 9)):
            logger.error('Looks like the system ran out of memory')
        raise RepeatException(str(e))
    except OSError as e:
        raise RepeatException(str(e))
def analyse_repeats(args, run_params, input_assembly, out_folder, log_file, config_file):
    logger.debug('-----Begin repeat analyser log------')
    cmdline = [REPEAT_BIN, 'repeat', '--disjointigs', input_assembly, '--reads', ','.join(args.reads), '--out-dir', out_folder, '--config', config_file, '--log', log_file, '--threads', str(args.threads)]
    if args.debug:
        cmdline.append('--debug')
    if args.meta:
        cmdline.append('--meta')
    if args.keep_haplotypes:
        cmdline.append('--keep-haplotypes')
    cmdline.extend(['--min-ovlp', str(run_params['min_overlap'])])
    if args.hifi_error:
        cmdline.extend(['--extra-params', 'repeat_graph_ovlp_divergence={}'.format(args.hifi_error)])
    try:
        logger.debug(('Running: ' + ' '.join(cmdline)))
        subprocess.check_call(cmdline)
    except subprocess.CalledProcessError as e:
        if (e.returncode == (- 9)):
            logger.error('Looks like the system ran out of memory')
        raise RepeatException(str(e))
    except OSError as e:
        raise RepeatException(str(e))