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

combineSpectra not working for readMSData MSNexp #474

Closed
joannawolthuis opened this issue Jun 27, 2019 · 5 comments
Closed

combineSpectra not working for readMSData MSNexp #474

joannawolthuis opened this issue Jun 27, 2019 · 5 comments
Assignees
Labels

Comments

@joannawolthuis
Copy link

joannawolthuis commented Jun 27, 2019

Hi there! I'm trying to import DI-MS data and sum/combine the positive and negative mode spectra scans, but get the following (same for in memory):. The documentation notes that an MSnExp should be a possible input, but it isn't working for me...

files = c("~/Downloads/rawdata/file.mzML", "~/Downloads/rawdata/file2.mzML")
mem <- readMSData(files, mode = "onDisk", msLevel. = 1)
combineSpectra(mem)
# Error in (function (classes, fdef, mtable)  : 
#   unable to find an inherited method for function ‘combineSpectra’ for signature ‘"OnDiskMSnExp"’
@sgibb
Copy link
Collaborator

sgibb commented Jun 27, 2019

Indeed in contrast to the manual page

\item{object}{A \linkS4class{MSnExp} or \linkS4class{Spectra}}

combineSpectra isn't define for neither MSnExp nor OnDiskMSnExp objects.

@jorainer is this intended or a bug?

@sgibb sgibb added the bug label Jun 27, 2019
@sgibb sgibb assigned sgibb and jorainer and unassigned sgibb Jun 27, 2019
@jorainer
Copy link
Collaborator

jorainer commented Jul 1, 2019

Hm - seems I implemented that only for Spectra and forgot about the MSnExp implementation...

@joannawolthuis , could you first please check if the Spectra implementation would work for you?

To get a Spectra object you would have to call:

sps <- Spectra(spectra(mem))

on your mem object above.

jorainer added a commit that referenced this issue Jul 2, 2019
- Add the combineSpectra,MSnExp method.
- Add related documentation and unit tests.
- Remove warnings in meanMzInts and consensusSpectrum to avoid confusions for
  general input data (such as MS2 spectra from DIA data).
@jorainer
Copy link
Collaborator

jorainer commented Jul 2, 2019

I've implemented the combineSpectra,MSnExp method and made a pull request (#475). With that it will be possible to call combineSpectra on MSnExp and OnDiskMSnExp objects - the result will be a MSnExp object.

@joannawolthuis
Copy link
Author

Hi :-) Thanks so much for taking a look so quickly! I was going to try with the Spectra implementation but it seemed a bit hacky to get it back into the MSnexp format for further peak calling, so I'll wait for this pull to go through :-)

jorainer added a commit that referenced this issue Jul 10, 2019
Add combineSpectra,MSnExp method (issue #474)
@jorainer
Copy link
Collaborator

jorainer commented Sep 3, 2019

Closing this issue. Feel free to reopen if needed.

@jorainer jorainer closed this as completed Sep 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants