You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tutorial sections and SQLite database for MONA Spectral Database (.msp) #27
First of all many thanks for this utterly great and comprehensible tutorial and of course all the wonderful work hidden in the Spectra package.
I would like to ask some questions about it:
1.) Could function compareSpectra() always return type matrix (array)?. This would it ease up the determination of best_match in case of length(mbank_sub) == 1 or length(sps_sub) == 1.
Implicetely I would suggest to introduce a drop = F argument in the return statement of the function for clarity so as to have the individual correct row and col indicees for the respective matching partners (indicess db_sub & sps_sub) ...
Sure, that's a very good suggestion. I myself never used the MsBackendMsp backend but I will look into that. Regarding the database, this is a non-official database dump, right? In what format is MoNa providing the data in general? Back then when I checked it it was their own yaml format... not ideal...
For the parallel (and maybe more convenient) matching, have a look also at the new tutorial I added: https://jorainer.github.io/SpectraTutorials/articles/Spectra-matching-with-MetaboAnnotation.html , pre-filtering by matching precursor m/z significantly increases the performance. Alternatively, there is the possibility to use BPPARAM = MulticoreParam(4) or equivalent to run comparisins in parallel. Only, since there are no parallel connections to the database, the parallel processing is limited to the data after it was retrieved from the database.
Again, regarding 1): compareSpectra has a parameter SIMPLIFY. If you set that to SIMPLIFY = FALSE it will always return a matrix. We'll look into changing the default SIMPLIFY = TRUE into SIMPLIFY = FALSE, but for now it should work if you do that manually.
Activity
jorainer commentedon Oct 21, 2021
Thanks for the feedback!
Sure, that's a very good suggestion. I myself never used the
MsBackendMspbackend but I will look into that. Regarding the database, this is a non-official database dump, right? In what format is MoNa providing the data in general? Back then when I checked it it was their own yaml format... not ideal...For the parallel (and maybe more convenient) matching, have a look also at the new tutorial I added: https://jorainer.github.io/SpectraTutorials/articles/Spectra-matching-with-MetaboAnnotation.html , pre-filtering by matching precursor m/z significantly increases the performance. Alternatively, there is the possibility to use
BPPARAM = MulticoreParam(4)or equivalent to run comparisins in parallel. Only, since there are no parallel connections to the database, the parallel processing is limited to the data after it was retrieved from the database.jorainer commentedon Oct 21, 2021
Ah, and regarding 1): I've opened an issue in
Spectra.jorainer commentedon Oct 21, 2021
Again, regarding 1):
compareSpectrahas a parameterSIMPLIFY. If you set that toSIMPLIFY = FALSEit will always return amatrix. We'll look into changing the defaultSIMPLIFY = TRUEintoSIMPLIFY = FALSE, but for now it should work if you do that manually.Tony-II commentedon Oct 24, 2021
many thanks so far! Regarding:
1.) this works really well ...
2.) if the format under https://github.com/computational-metabolomics/msp2db/releases/tag/v0.0.14-mona-23042021
is not the ideal one, there would be an alternative for other formats under:
https://mona.fiehnlab.ucdavis.edu/downloads
The availabe formats offered here are:
.json
.msp (NIST compatible)
.sdf (NIST compatible)