MSGFPlus / msgfplus

MS-GF+ (aka MSGF+ or MSGFPlus) performs peptide identification by scoring MS/MS spectra against peptides derived from a protein sequence database.
Other
76 stars 36 forks source link

getDeconvolutedSpectrum loses the last peak #62

Closed DennisGoldfarb closed 5 years ago

DennisGoldfarb commented 5 years ago

The initial for loop in getDeconvolutedSpectrum goes fromi=0 to i < spectrum.size()-1, so it never checks the last peak (unless it's a z>=2 isotope of the second to last peak) and therefore it always gets clipped off from the deconvolutedSpectrum.

Changing the ending condition to i<spectrum.size() appears fine. The inner loop that looks for isotopes is j=i+1 to j<spectrum.size() so it won't go out of bounds even if i = spectrum.size()-1

My peptide IDs went up ~3% after fixing it

alchemistmatt commented 5 years ago

Release https://github.com/MSGFPlus/msgfplus/releases/tag/v2019.04.18 includes this fix.