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