Absolute counts of each residue type in a single column.

def col_counts(col, weights=None, gap_chars='-.'):
    """Absolute counts of each residue type in a single column."""
    cnt = defaultdict(float)
    for aa, wt in zip(col, weights):
        if aa not in gap_chars:
            cnt[aa] += wt
    return cnt