Implement the convolution cyclopeptide sequencing algorithm.

Assignment

Write a function convolution_cyclopeptide_sequencing that takes three arguments: i) an integer $$M \in \mathbb{N}_0$$, ii) an integer  $$N \in \mathbb{N}_0$$ and iii) an experimental spectrum $$s$$ of a cyclic peptide. The function must return a cyclic peptide LeaderPeptide with amino acids taken only from the top $$M$$ elements (and ties) of the convolution of $$s$$ that fall between 57 and 200, and where the size of Leaderboard is restricted to the top $$N$$ (and ties).

Example

>>> spectrum = (57, 57, 71, 99, 129, 137, 170, 186, 194, 208, 228, 265, 285, 299, 307, 323, 356, 364, 394, 422, 493)
>>> convolution_cyclopeptide_sequencing(20, 60, spectrum)
(57, 72, 57, 99, 71, 137)

Resources