Closed meowcat closed 11 months ago
Hi,
It hinders usability that the NIST MSP export cannot be imported with the LIB2NIST tool. The problem is still the same, the tool chokes on m/z < 1. Fixing it is can be as easy as cat MassBank_NIST.msp | grep -v -e "^0" > MassBank_NIST_fixed.msp
- this works, even though the few affected spectra have incorrect Num Peaks count, this is successfully recalculated by the importer. Can anything be done about this?
Note: To maintain Num Peaks correct one can instead cat MassBank_NIST.msp | sed -e 's/^0/1/' > MassBank_NIST_fixed1.msp
, which is arguably more cheaty as it introduces fake masses. This maintains the number of peaks but leads to non-monotonic m/z order in the spectra which RforMassSpectrometry Spectra would choke on IIRC. The clean solution is to either discard the spectra or remove the peaks before export.
Thanks for pinging this again. I will implement it on the export side. I analyzed this issue and as you mentioned there are just 79 spectra with this issue and the relative intensity of the affected peaks is low.
I made the required changes to the exporter and also updated the NIST export in the current release. Could you please check https://github.com/MassBank/MassBank-data/releases/download/2023.11/MassBank_NIST.msp ?
Super!
Hi,
We have MSP export for RIKEN and NIST format now (#132). However when converting the NIST MSP into a NIST library (using LIB2NIST https://chemdata.nist.gov/dokuwiki/doku.php?id=chemdata:nistlibs ) it fails on the FAB-EBEB spectra starting on CA000007. This wouldn't be much of an issue, since it concerns few spectra; but the conversion stops at the first problem, so the resulting library is truncated.
This was actually also the case with the Massbank2MSP exporter from RIKEN (http://prime.psc.riken.jp/compms/others/main.html#Massbank2msp)
The conversion works giving a complete library of 86451 spectra if I remove all lines starting with 0. So the issue isn't zero-intensity peaks but m/z < 1. (I guess they are getting indexed into bins and there is no bin for 0-1). This is of course not truly a specification issue, since it isn't written anywhere that these peaks should not be valid, but it could be useful for adoption if these peaks are deleted out for the MSP export?