wfondrie / depthcharge

A deep learning toolkit for mass spectrometry
https://wfondrie.github.io/depthcharge/
Apache License 2.0
59 stars 18 forks source link

Add detail to invalid spectra warning parsers.py #41

Open melihyilmaz opened 9 months ago

melihyilmaz commented 9 months ago

Warning should include why the spectra were invalid e.g. WARNING: Skipped 6745 spectra with invalid charge > 5.

wsnoble commented 9 months ago

Follow-up comment from Wout: "It can be any reason, including invalid charge, but also other issues encountered during parsing and preprocessing, such as an insufficient number of peaks. Considering that we report spectra as skipped if there's an exception thrown in the parsing/preprocessing without any way to record why those spectra are skipped, unfortunately it's not as simple as just providing more details in the log message."

That said, I think it would still be a good idea to provide this info, though I understand it might require some bookkeeping to track the counts for the various reasons a spectrum might be skipped.