def biomart_iterator(columns,
                     biomart="ensembl",
                     dataset="hsapiens_gene_ensembl",
                     host='www.biomart.org',
                     path="/biomart/martservice",
                     filters=None,
                     values=None,
                     archive=False):

    R.library("biomaRt")

    mart = R.useMart(biomart=biomart,
                     dataset=dataset,
                     host=host,
                     path=path,
                     archive=archive)

    if filters is not None:
        filter_names = rpy2.robjects.vectors.StrVector(filters)
    else:
        filter_names = ""

    if values is not None:
        filter_values = values
    else:
        filter_values = ""

    # result is a dataframe
    result = R.getBM(
        attributes=rpy2.robjects.vectors.StrVector(columns),
        filters=filter_names,
        values=filter_values,
        mart=mart)

    # access via result.rx was broken in rpy2 2.4.2, thus try
    # numeric access
    assert tuple(result.colnames) == tuple(columns),\
        "colnames in dataframe: %s different from expected: %s" % \
        (str(tuple(result.colnames)), tuple(columns))

    for data in zip(*[result[x] for x in range(len(columns))]):
        yield dict(zip(columns, data))
Test the ability to edit a current entry, using valid new values
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Biomart.py/biomart_iterator--crossover with--dataset/ETHPy150Open caktus/django-timepiece/timepiece/entries/tests/test_timesheet.py/CreateEditEntry.testEditCurrentDiffTime