Skip to content

Commit

Permalink
docs: fix Phili's comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Jul 18, 2024
1 parent 6aa8305 commit bd1784b
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 33 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: Spectra
Title: Spectra Infrastructure for Mass Spectrometry Data
Version: 1.15.4
Version: 1.15.5
Description: The Spectra package defines an efficient infrastructure
for storing and handling mass spectrometry spectra and functionality to
subset, process, visualize and compare spectra data. It provides different
Expand Down
2 changes: 1 addition & 1 deletion R/MsBackend.R
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,7 @@
#'
#' @return See documentation of respective function.
#'
#' @author Johannes Rainer, Sebastian Gibb, Laurent Gatto
#' @author Johannes Rainer, Sebastian Gibb, Laurent Gatto, Philippine Louail
#'
#' @md
#'
Expand Down
23 changes: 14 additions & 9 deletions R/Spectra-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,11 @@ processingChunkFactor <- function(x) {
#' has to be an available spectra or peaks variable. `<range>` can be a
#' `numeric` of length 2 defining the lower and upper boundary, or a `numeric`
#' two-column matrix (multi-row matrices are also supported, see further
#' below). `filterPeaksRanges(s, mz = c(200, 300))` woudl for example reduce
#' below). `filterPeaksRanges(s, mz = c(200, 300))` would for example reduce
#' the peaks matrices of the `Spectra` object `s` to mass peaks with an m/z
#' value between 200 and 300. `filterPeaksRanges()` returns the original
#' `Spectra` object with the filter operation added to the processing queue.
#' Thus, the filter gets only applied when the peaks data gets extracted
#' Thus, the filter gets **only** applied when the peaks data gets extracted
#' with `mz()`, `intensity()` or `peaksData()`. If ranges for both spectra
#' **and** peaks variables are defined, the function evaluates first whether
#' the spectra variable value for a spectrum is within the provided range and,
Expand All @@ -1221,19 +1221,24 @@ processingChunkFactor <- function(x) {
#' or peaks variables) have to match.
#'
#' **Missing value handling**: any comparison which involves a missing value
#' (beingvit a spectra variable value, a peaks variable value or a value
#' in one of thevprovided ranges) is treated as a logical `FALSE`. For
#' (being it a spectra variable value, a peaks variable value or a value
#' in one of the provided ranges) is treated as a logical `FALSE`. For
#' example, if the retention time of a spectrum is `NA` and the data is
#' filtered using a retention time range, an empty peaks matrix is returned
#' (for `keep = TRUE`, for `keep = FALSE` the full peaks matrix is returned).
#'
#' @note
#'
#' In contrast to other *filter* functions, this function does not provide a
#' `msLevel.` parameter to apply the filter only on spectra of the specified
#' MS levels. In contrast, to apply no, or different, filters to spectra from
#' different MS levels, multi-row range matrices can be used (see examples
#' below).
#' In contrast to some other *filter* functions, this function does not provide
#' a `msLevel` parameter that allows to define the MS level of spectra on which
#' the filter should be applied. The filter(s) will always be applied to
#' **all** spectra (irrespectively of their MS level). Through combination of
#' multiple filter ranges it is however possible to apply MS level-dependent
#' filters (see examples below for details).
#'
#' The filter will not be applied immediately to the data but only executed when
#' the mass peak data is accessed (through `peaksData()`, `mz()` or
#' `intensity()`) or by calling `applyProcessing()`.
#'
#' @param object A [Spectra] object.
#'
Expand Down
15 changes: 9 additions & 6 deletions R/Spectra.R
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,10 @@ NULL
#' @section Filter spectra data:
#'
#' Filter a `Spectra` object based on the spectra data. This includes subset
#' operations that reduce the number of spectra in the object as well as filters
#' that reduce the *content* of the `Spectra` object. See section
#' *Filter peaks data* below for functions that filter the peaks data of a
#' `Spectra`.
#' operations that immediately reduce the number of spectra in the object as
#' well as filters that reduce the *content* of the `Spectra` object.
#' See section *Filter peaks data* below for functions that filter the peaks
#' data of a `Spectra`.
#'
#' - `[`: subsets the spectra keeping only selected elements (`i`). The method
#' **always** returns a `Spectra` object.
Expand Down Expand Up @@ -456,7 +456,10 @@ NULL
#' @section Filter or aggregate mass peak data:
#'
#' Operations that filter or aggregate the mass peak data from each spectrum
#' without changing the number of spectra in a `Spectra` object.
#' without changing the number of spectra in a `Spectra` object. Also, the
#' actual subsetting/aggregation operation is only executed once peaks data is
#' accessed (through `peaksData()`, `mz()` or `intensity()`) or
#' `applyProcessing()` is called.
#'
#' - `combinePeaks()`: combines mass peaks **within each spectrum** with a
#' difference in their m/z values that is smaller than the maximal
Expand Down Expand Up @@ -1115,7 +1118,7 @@ NULL
#'
#' @param ... Additional arguments.
#'
#' @author Sebastian Gibb, Johannes Rainer, Laurent Gatto
#' @author Sebastian Gibb, Johannes Rainer, Laurent Gatto, Philippine Louail
#'
#' @md
#'
Expand Down
2 changes: 1 addition & 1 deletion man/MsBackend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions man/Spectra.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 14 additions & 9 deletions man/filterPeaksRanges.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bd1784b

Please sign in to comment.