Preparation of peptides or proteins