Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

Learn more
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

optimize function names (removePeaks, clean) #89

Open
schymane opened this issue Jan 21, 2020 · 0 comments
Open

optimize function names (removePeaks, clean) #89

schymane opened this issue Jan 21, 2020 · 0 comments

Comments

@schymane
Copy link

@schymane schymane commented Jan 21, 2020

Discussion at metaRbolomics, these two functions are a bit of a misnoma:

https://github.com/rformassspectrometry/Spectra/blob/master/R/Spectra.R#L401
"removePeaks" is rather "markPeaks" or something (it doesn't actually remove peaks)

`#' - `removePeaks`: *removes* peaks lower or equal to a threshold intensity
#'   value `threshold` by setting their intensity to `0`. With the default
#'   `threshold = "min"` all peaks with an intensity smaller or equal to the
#'   minimal non-zero intensity is set to `0`. If the spectrum is in
#'   profile mode, ranges of successive non-0 peaks <= `threshold` are set to 0.
#'   If the spectrum is centroided, then individual peaks <= `threshold` are set
#'   to 0. Note that the number of peaks is not changed unless `clean` is
#'   called after `removePeaks`.`

Whereas "clean" is not really clean but more analogous to trim

https://github.com/rformassspectrometry/Spectra/blob/master/R/Spectra.R#L412

`#' @param all for `clean`: `logical(1)` whether all 0 intensity peaks should be
#'     removed (`TRUE`) or whether 0-intensity peaks directly adjacent to a
#'     non-zero intensity peak should be kept (`FALSE`).`
sneumann added a commit to sneumann/Spectra that referenced this issue Jan 21, 2020
Related to discussions here at the RFMF workshop (see rformassspectrometry#89 )
Yours, Steffen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.