Finds kmers that are present in 2 databases.
    :param database_1: First database generated by kmc.
    :param database_2: Second database generated by kmc.
    :param results: Result database, containing reads in both database 1 and 2.
    :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 intersect(database_1, database_2, results, returncmd=False):
    """
    Finds kmers that are present in 2 databases.
    :param database_1: First database generated by kmc.
    :param database_2: Second database generated by kmc.
    :param results: Result database, containing reads in both database 1 and 2.
    :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 intersect {} {} {}'.format(database_1, database_2, results)
    out, err = accessoryfunctions.run_subprocess(cmd)
    if returncmd:
        return out, err, cmd
    else:
        return out, err