def update_position(config, adaptator, adapt, adaptator_length, ntuple):
    """
    Update barcode position in config file when a barcode is removed

    params: config
    params: adaptator
    params: adapt
    params: adaptator_length
    """
    if not adapt == 'conditions' and not adapt == adaptator and config[adapt][
        'coords']['header'] == config[adaptator]['coords']['header'
        ] and config[adapt]['coords']['reads'] == ntuple:
        if config[adapt]['coords']['start'] > config[adaptator]['coords'][
            'start']:
            config[adapt]['coords']['start_update'] = config[adapt]['coords'][
                'start'] - adaptator_length
            config[adapt]['coords']['stop_update'] = config[adapt]['coords'][
                'stop'] - adaptator_length
    return config
