Dumps output from kmc database into tab-delimited format.
    :param database: Database generated by kmc.
    :param output: Name for output.
    :param min_occurences: Minimum number of times kmer must be in database to be dumped.
    :param max_occurences: Maximum number of times a kmer can be seen and still be dumped.
    :param returncmd: If true, will return the command used to call KMC as well as out and err.
    :return: Stdout and stderr from kmc.

def dump(database, output, min_occurences=1, max_occurences=250, returncmd=False):
    """
    Dumps output from kmc database into tab-delimited format.
    :param database: Database generated by kmc.
    :param output: Name for output.
    :param min_occurences: Minimum number of times kmer must be in database to be dumped.
    :param max_occurences: Maximum number of times a kmer can be seen and still be dumped.
    :param returncmd: If true, will return the command used to call KMC as well as out and err.
    :return: Stdout and stderr from kmc.
    """
    cmd = 'kmc_tools dump -ci{} -cx{} {} {}'.format(min_occurences, max_occurences, database, output)
    out, err = accessoryfunctions.run_subprocess(cmd)
    if returncmd:
        return out, err, cmd
    else:
        return out, err