def create_barcode_uuid_mapping(biotab_file):
    """Return a pair of dict mappings from uuid -> barcode and barcode -> uuid"""
    # Read in the lines of the file
    with open(biotab_file, 'r') as handle:
        lines = handle.readlines()
    header_line = lines[0]
    header_tokenized = header_line.split()
    uuid_column = header_tokenized.index("bcr_patient_uuid")
    barcode_column = header_tokenized.index("bcr_patient_barcode")

    # Walk through the content lines and extract the barcode mapping
    content_lines = lines[3:]
    uuid_to_barcode = {}
    barcode_to_uuid = {}
    for line in content_lines:
        line_tokenized = line.split()
        uuid = line_tokenized[uuid_column]
        barcode = line_tokenized[barcode_column]
        if uuid in uuid_to_barcode:
            raise ValueError("Found duplicate UUID: %s" % uuid)
        if barcode in barcode_to_uuid:
            raise ValueError("Found duplicate barcode: %s" % barcode)
        barcode_to_uuid[barcode] = uuid
        uuid_to_barcode[uuid] = barcode_column
    # Return the two mppings
    return uuid_to_barcode, barcode_to_uuid