def check_barcode_is_off(alignment, tags, log=None):
    """
    See if the barcode was recognised with soft clipping.
    if so, it returns True and can be counted in the optional log

    :param alignment: the read
    :param tags: alignment tags as dict
    :return:
    """
    if 'RG' in tags:
        if tags['bm'] != '0':
            if log:
                log.misbar(alignment)
            return True
        else:
            return False
    else:
        return False