Skip to content

Instantly share code, notes, and snippets.

@Bemmu
Created November 7, 2014 13:13
Show Gist options
  • Save Bemmu/c4361a8202b98ea3a806 to your computer and use it in GitHub Desktop.
Save Bemmu/c4361a8202b98ea3a806 to your computer and use it in GitHub Desktop.
LEADERBOARDCYCLOPEPTIDESEQUENCING(Spectrum, N)
Leaderboard ← {empty peptide}
LeaderPeptide ← empty peptide
while Leaderboard is non-empty
Leaderboard ← Expand(Leaderboard)
for each Peptide in Leaderboard
# --------------------------------------
IF SCORE(PEPTIDE, SPECTRUM) == 83:
print PEPTIDE
if Mass(Peptide) = ParentMass(Spectrum)
if Score(Peptide, Spectrum) > Score(LeaderPeptide, Spectrum)
LeaderPeptide ← Peptide
else if Mass(Peptide) > ParentMass(Spectrum)
remove Peptide from Leaderboard
Leaderboard ← Trim(Leaderboard, Spectrum, N)
output LeaderPeptide
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment