def run(excel_parsed_manifest, sample_status_accepted_values,
        sub_race_values, sub_gender_values, sub_ethnicity_values,
        sub_sample_blank_values, sub_project_type_values, cast_plate_box_values,
        required_field_list):
    check_log = clean_logfile(current_dir, logger_filename)
    logger = configure_logger(logger_filename)
    workbook, carrier_id_sheet, caid_cast_sheet, cast_plate_sheet = get_excel_sheet(excel_parsed_manifest,
                                                                                    logger)
    req_carrier_id_headers, unique_carrier_id_headers, req_caid_cast_headers,\
    unique_caid_cast_headers, req_cast_plate_sheet, unique_cast_plate_sheet = required_headers(carrier_id_sheet,
                                                                                               caid_cast_sheet, cast_plate_sheet)
    carrier_id_empty_record = check_fields(carrier_id_sheet, logger, req_carrier_id_headers, "CARRIER ID")
    carrier_id_list, carrier_id_record = index_row_header(carrier_id_sheet, logger, "CARRIER ID")
    carrier_unique_field = count_fields(carrier_id_list, unique_carrier_id_headers, logger, "CARRIERS ID")
    modified_required_field = get_modified_required_list(required_field_list)
    validate_carrier_record = carrier_id_validate(carrier_id_record, logger, sample_status_accepted_values,
                                                  sub_race_values, sub_gender_values, sub_ethnicity_values,
                                                  "CARRIER ID", modified_required_field)
    caid_cast_empty_record = check_fields(caid_cast_sheet, logger, req_caid_cast_headers, "CAID_CAST")
    caid_cast_list, caid_cast_record = index_row_header(caid_cast_sheet, logger, "CAID_CAST")
    caid_cast_unique_field = count_fields(caid_cast_list, unique_caid_cast_headers, logger, "CAID_CAST")
    validate_caid_cast_record = caid_cast_validate(caid_cast_record, logger, sub_sample_blank_values, "CAID_CAST", modified_required_field)
    cast_plate_empty_record = check_fields(cast_plate_sheet, logger, req_cast_plate_sheet, "CAST Plate")
    cast_plate_list, cast_plate_record = index_row_header(cast_plate_sheet, logger, "CAST Plate")
    cat_plate_unique_field = count_fields(cast_plate_list, unique_cast_plate_sheet, logger, "CAST Plate")
    solve_date = get_date_field(workbook, cast_plate_sheet, logger, "CAST Plate")
    validate_cast_plate_record = cast_plate_validate(cast_plate_record, logger,
                                                     sub_project_type_values, cast_plate_box_values, "CAST Plate", modified_required_field)
def run(submission_manifest):
    logger = configure_logger(logger_filename)
    manifest = get_excel_sheet(submission_manifest, logger)
    data_headers, data_row = get_data_headers(manifest, regex)    
    carrier_table_headers, caid_cast_headers = get_confusing_header(data_headers, carrier_id_table_name_fields,
                                                 caid_plate_table_fields)
    get_data_index = data_fields_index(manifest, data_row)
    carriers_dict, caid_plate_dict, carrier_sample  = sample_data(manifest,
                                                                  data_headers,
                                                                  get_data_index,
                                                                  carrier_table_headers,
                                                                  caid_cast_headers)
    pprint.pprint(carriers_dict)
    cast_tuple_output, contact_id = cast_plate_parse(manifest)
    carrier_id_number = connect_db(logger)
    create_carrier_ID, sample_number = generate_carrier_id(carrier_sample, logger, carrier_id_number)
    carrier_tuple_output, caid_tuple_output =  create_tuple_output(carriers_dict, caid_plate_dict,
                                                                   create_carrier_ID, sample_number)

    excel_output = generate_excel_output(carrier_output_table, carrier_headers, carrier_tuple_output,
                                         caid_cast_output_table, caid_cast_header,
                                         caid_tuple_output, cast_plate_output_table,
                                         cast_plate_header, cast_tuple_output, current_date, contact_id)
def run(excel_workbook, logger_filename):
    logger = configure_logger(logger_filename)
    check_log = check_validation_log(current_dir)
    workbook, carrier_id_sheet, caid_cast_sheet, cast_plate_sheet = get_excel_sheet(excel_workbook, logger)
    import_carrier_id_table = connect_to_access(carrier_id_sheet, caid_cast_sheet, cast_plate_sheet)