def get_norm_socre(template, score, qcat_config):
    """
    Normalize alignment score

    :param template: Barcoding adapter
    :param score: Alignment score
    :param qcat_config: Config
    :return: Normalized score
    """
    bc_len = template.get_barcode_length(0) + template.get_barcode_length(1)
    a_len = template.get_adapter_length()
    return score * 100.0 / ((a_len - bc_len) * qcat_config.match + bc_len *
        qcat_config.nmatch)
