mobiusklein / ms_peak_picker

A small library to provide peak picking for software processing mass spectrometry data
20 stars 9 forks source link

added return statement in FittedPeak._create #2

Closed lukauskas closed 7 years ago

lukauskas commented 7 years ago

There's a missing return statement in C-implemented FittedPeak._create This causes .clone() to return None instead of a new instance, e.g.:

import ms_peak_picker
args = (1.23, 4.56, 7.89, 1, 1, 0.1, 13)
fp = ms_peak_picker.peak_set.FittedPeak(*args)

print('fp.clone(): {!r}'.format(fp.clone()))

results in

fp.clone(): None

Adding a return statement, obviously, fixes this:

fp.clone(): FittedPeak(mz=1.230, intensity=4.560, signal_to_noise=7.890, peak_count=1, index=1, full_width_at_half_max=0.100, area=13.000)
mobiusklein commented 7 years ago

Yes, I apparently failed to push the fix from master. Thank you for catching this. I wasn't aware anyone was using this library, and its relatives which I saw your other PR on. I've pushed my local change history which makes this redundant.

Thank you for opening this all the same. Your PR for ms_deisotope should be integrated.