Fix for a bug causing an index error in mass_spectrum\calc\PeakPicking.py #2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Running this code:
gave the following error:

This was due to the list
freqhaving a different length tomzandabundancein thePeakPicking.pyclass. I think this problem is due to the mz cut offs not being equally applied toself.freq_exp_profilein thecut_mz_domain_peak_picking(self)function which returns these lists.I have come up with a possible fix for this by first applying the low mz cut off to
self.freq_exp_profileto create a new variablefreq_domain_low_Y_cutoffand then applying the high mz cut off. This gets rid of the error when running the above code, but I haven't tested the change in any other way. I'm also not 100 % sure about this, so definitely needs reviewing.