lazear / sage

Proteomics search & quantification so fast that it feels like magic
https://sage-docs.vercel.app
MIT License
201 stars 38 forks source link

Unintuitive behaviour of the 'precursor_charge' setting in the .json config. #137

Open MatteoLacki opened 1 month ago

MatteoLacki commented 1 month ago

Hi!

First of all: thanks for the great work you do: without your search engine my projects would be completely stuck.

I have noticed that at least in v.0.14.7 (but might be earlier) the precursor_charge setting has a bit unintuitive behavior. The problem is, that whenever mgf spectra contain charge info, this setting is neglected. This behavior is in fact documented, nevertheless it is a bit cumbersome: a user that actually wants precursor_charge to be used needs to modify his MGF and it is simply inconvenient. I was rather expecting that in this cases SAGE would neglect the charge state provided in MGFs, but this is not how it works.

In order not to break up the current behavior, I would suggest from some next version to add an additional parameter to the config, such as neglect_mgf_charges by default set to false. Would that be an option?

With very best wishes,

Matteo Lacki

lazear commented 1 month ago

Hi Matteo,

I think this is a good feature - shouldn't be too difficult to add in either. I'm about to go on vacation for 2 weeks, so if you want something soon, I can give some pointers on how to build this feature for testing