def calc_pident(a, b):
    """
    calculate percent identity
    """
    m = 0
    mm = 0
    for A, B in zip(list(a), list(b)):
        if A == '.' or B == '.':
            continue
        if A == '-' and B == '-':
            continue
        if A == B:
            m += 1
        else:
            mm += 1
    try:
        return float(float(m) / float(m + mm)) * 100
    except:
        return 0
