def amino_acid_distribution(peptides, smoothing=<NUM_LIT:0.0>):
peptides = pandas.Series(peptides)<EOL>aa_counts = pandas.Series(peptides.map(collections.Counter).sum())<EOL>normalized = aa_counts / aa_counts.sum()<EOL>if smoothing:<EOL><INDENT>normalized += smoothing<EOL>normalized /= normalized.sum()<EOL><DEDENT>return normalized<EOL>
Compute the fraction of each amino acid across a collection of peptides.

Parameters
----------
peptides : list of string
smoothing : float, optional
    Small number (e.g. 0.01) to add to all amino acid fractions. The higher
    the number the more uniform the distribution.

Returns
-------
pandas.Series indexed by amino acids