Open YANGJJ93research opened 2 years ago
Yes, compareSpectra
is defined both in MSnbase
and Spectra
- you could explicitely call the one from Spectra
using res <- Spectra::compareSpectra(mbank_sub, query_spectra, ppm = 20)
.
I've also just finished a new (short) tutorial of using the MetaboAnnotatio
package we're currently developing for MS/MS spectra matching including its use in an xcms
-based analysis workflow. It's included in the SpectraTutorials page (the MS/MS Spectra Matching with MetaboAnnotation article).
Thanks a lot. There is also an error for ppm function from "filterPrecursorMz". Please kindly find the error below. "Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘ppm’ for signature ‘"numeric"’".
btw, I enjoyed your workshop on youtube a lot. Thanks a lot for your help!
Regarding the error - maybe you need to load the MsCoreUtils
package - the problem is again thata ppm
is defined both in xcms
as well as in MsCoreUtils
.
thanks. i think i installed the package in my environment. Nevertheless, i will try a reinstallation and get back to you.
I was trying to using massbank backend in Spectra after data preprocessing by MSnbase packages. After using "chromPeakSpectra" with "return.type=spectra", the error popped up like this. felt like the compare functions in both packages went into a collision? May I know any way to use the specific compareSpectra function in Spectra?
> res <- compareSpectra(mbank_sub,query_spectra,ppm=20) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘compareSpectra’ for signature ‘"Spectra", "Spectra"’