def test_adaptator(config, adaptator, ntuple, verbose=False):
    """
    Run tests on the adaptator

    params: config
    params: adaptator
    """
    try:
        if adaptator not in config.keys():
            if verbose:
                print("error: extract_barcode(), config doesn't contain " +
                    str(adaptator) + ' adaptator.')
            raise KeyError
        if 'coords' not in config[adaptator].keys():
            if verbose:
                print('error: extract_barcode(), ' + str(adaptator) +
                    ' has no coords')
            raise KeyError
        if 'reads' not in config[adaptator]['coords'].keys():
            if verbose:
                print('error: extract_barcode(), ' + str(adaptator) +
                    ' has no reads')
            raise KeyError
        if 'start' not in config[adaptator]['coords'].keys():
            if verbose:
                print('error: extract_barcode(), ' + str(adaptator) +
                    ' has no start')
            raise KeyError
        if 'stop' not in config[adaptator]['coords'].keys():
            if verbose:
                print('error: extract_barcode(), ' + str(adaptator) +
                    ' has no stop')
            raise KeyError
        if not ntuple == config[adaptator]['coords']['reads']:
            if verbose:
                print('error: extract_barcode(), ' + str(adaptator) +
                    ' not present for reads ' + str(ntuple))
            raise ValueError
    except KeyError:
        if verbose:
            print('error: test_adaptator() ')
        raise KeyError
    except ValueError:
        if verbose:
            print('error: test_adaptator() ')
        raise ValueError
