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

Add fillCoreSpectraVariables utility function and report number of matching peaks with compareSpectra #351

Merged
merged 3 commits into from
Feb 21, 2025

Conversation

jorainer
Copy link
Member

@jorainer jorainer commented Feb 19, 2025

This PR adds two things:

  • Add the fillCoreSpectraVariables() function that fills a spectra data frame with eventually missing core spectra variables (with the correct data type). This function will be particularly helpful for newly implemented MsBackend classes.
  • Add parameter matchedPeaksCount parameter to compareSpectra() to allow reporting of the number of matching peaks between compared spectra (see issue compareSpectra to report also the number of matching peaks #350 for details).

- Add a `fillCoreSpectraVariables()` function that allows to fill a spectra data
  frame with eventually missing core spectra variables (with the correct data
  type). This function will be particularly helpful for newly implemented
  `MsBackend` classes.
- Add parameter `matchedPeaksCount` to `compareSpectra()` to allow reporting
  of the number of matching peaks between the compared spectra (issue #350).
@jorainer jorainer changed the title Add fillCoreSpectraData utility function and report number of matching peaks with compareSpectra Add fillCoreSpectraVariables utility function and report number of matching peaks with compareSpectra Feb 19, 2025
@jorainer jorainer requested a review from philouail February 19, 2025 09:34

#' The number of matching peaks:
sim[, , 2L]
```
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's unnecessary, but maybe you could add a small example of filtering based on the number of matching peaks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, yes, thanks. I will add that later.

Copy link
Collaborator

@philouail philouail left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really good, I'm all good with the code and documentation.

I just added a small suggestion for the vignette.

@jorainer jorainer merged commit afc73f6 into main Feb 21, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants