Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compareSpectra function error #218

Open
YANGJJ93research opened this issue Oct 6, 2021 · 5 comments
Open

compareSpectra function error #218

YANGJJ93research opened this issue Oct 6, 2021 · 5 comments

Comments

@YANGJJ93research
Copy link

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"’

@jorainer
Copy link
Member

jorainer commented Oct 6, 2021

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).

@YANGJJ93research
Copy link
Author

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"’".

@YANGJJ93research
Copy link
Author

btw, I enjoyed your workshop on youtube a lot. Thanks a lot for your help!

@jorainer
Copy link
Member

jorainer commented Oct 7, 2021

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.

@YANGJJ93research
Copy link
Author

thanks. i think i installed the package in my environment. Nevertheless, i will try a reinstallation and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants