def experimentExists(batch, barcode, db):
    """Returns true if there is such an experiment in the SELEX_experiments
    table, false otherwise."""
    cmdStr = "SELECT * from SELEX_experiments where BarcodeBatch = \"" + \
            batch + "\" and Barcode = \"" + barcode + "\";"
    cursor=db.cursor()
    cursor.execute(cmdStr)
    rows = cursor.fetchall()
    if (len(rows) > 0):
        return True
    else:
        return False