def random_peptides(num, length=<NUM_LIT:9>, distribution=None):
if num == <NUM_LIT:0>:<EOL><INDENT>return []<EOL><DEDENT>if distribution is None:<EOL><INDENT>distribution = pandas.Series(<EOL><NUM_LIT:1>, index=sorted(amino_acid.COMMON_AMINO_ACIDS))<EOL>distribution /= distribution.sum()<EOL><DEDENT>return [<EOL>'<STR_LIT>'.join(peptide_sequence)<EOL>for peptide_sequence in<EOL>numpy.random.choice(<EOL>distribution.index,<EOL>p=distribution.values,<EOL>size=(int(num), int(length)))<EOL>]<EOL>
Generate random peptides (kmers).

Parameters
----------
num : int
    Number of peptides to return

length : int
    Length of each peptide

distribution : pandas.Series
    Maps 1-letter amino acid abbreviations to
    probabilities. If not specified a uniform
    distribution is used.

Returns
----------
list of string