Metabolomics Society Forum

Software => MS-DIAL => Topic started by: QizhiSu on September 03, 2021, 07:50:35 AM

Title: An R package for compiling either EI or tandem mass libraries
Post by: QizhiSu on September 03, 2021, 07:50:35 AM
Dear all,
I have developed an R package (mspcompiler) to compile either EI or tandem mass libraries from various sources into a single msp file that can be used in MS-DIAL. If you are interested in it, please feel free to try. Any questions and suggestions will be appreciated.
For EI libraries, the NIST library (if you have it installed) can be exported by Lib2NIST,  but the obtained msp file does not have retention index (RI) and SMILES which is now can be used to see the chemical structures in MS-DIAL. The mspcompiler package offers ways to add the SMILES and experimental RI (from your NIST installation). And you can also compile the RIKEN, MoNA, and SWGDRUG GC-MS libraries as well.
For tandem mass libraries, the NIST msms library (if you have NIST GC-MS library installed, you may probably have the NIST msms library as well, which might not be well recognized) can be organized with SMILES as well. In addition, you are able to add and re-organize the RIKEN, MoNA, and GNPS libraries as well.

Please read https://github.com/QizhiSu/mspcompiler for more detail.

Best,
Sukis
Title: Re: An R package for compiling either EI or tandem mass libraries
Post by: biswapriya on September 03, 2021, 10:34:18 PM
Wow!
Many congrats, Sukis! : )

That would be SUPER USEFUL for many!

Taking a cue from Hiroshi San, I had made a laborious, manual way of merging EI/ MS/MS spectral libraries, on Protocols.io:Steps for Building an Open Source EI-MS Mass Spectral Library for GC-MS -based Metabolomics: https://www.protocols.io/view/steps-for-building-an-open-source-ei-ms-mass-spect-8txhwpn

Also, Chris Spook, from NZ has developed a Python package to convert Wiley/ NIST to readable formats and you could possibly collaborate or add that functionality into your R-package for MS-DIAL use: https://drchrispook.com/2021/04/04/converting-nist-libraries-for-use-with-ms-dial/ !

Also, to add to your growing list of EI-libraries (plus, for anyone else!), please also add

High-Resolution EI+ Spectral Library of Anthropogenic Compounds: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7985345/ from Elliot, where the .msp is opnely available : https://zenodo.org/record/4471217#.YTL2gt_hVPY

Btw, would love to include/ archive the "mscompiler" as a tool in 2021 metabolomics software review/ iteration soon!: )

Thank you for the efforts!
Best,
Biswa
Title: Re: An R package for compiling either EI or tandem mass libraries
Post by: QizhiSu on September 04, 2021, 12:54:08 AM
Dear Biswa,
Thanks a lot for your kind suggestions!!

Best,
Sukis
Title: Re: An R package for compiling either EI or tandem mass libraries
Post by: QizhiSu on September 04, 2021, 01:04:21 AM
One thing to comment on. I saw that some forks say Lib2NIST cannot convert all spectra at once but in my experience, we can do that. What we need to do is to tick the Use Subset, and to specify all spectra which can be check in the NIST MS Search Program, in the Define Subset. Please see details in the mspcompiler vignettes.

Best,
Sukis

Title: Re: An R package for compiling either EI or tandem mass libraries
Post by: berrytf on September 09, 2021, 02:39:36 PM
Thank you very much for this. I'd been looking for something similar for some time! I wasn't quite sure how to use the MS-Finder info to pipe back into a larger existing .msp library before hand