Skip to content

Commit

Permalink
feat: add chromPeakSummary generic (issue #705)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorainer committed Sep 18, 2024
1 parent dacd665 commit 188541c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 1 deletion.
3 changes: 2 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,8 @@ exportMethods("hasChromPeaks",
"featureSpectra",
"chromPeakSpectra",
"chromPeakChromatograms",
"featureChromatograms"
"featureChromatograms",
"chromPeakSummary"
)

## feature grouping functions and methods.
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fix calculation of the correlation coefficient for peak shape similarity with
an idealized bell shape (*beta*) during gap filling for centWave-based
chromatographic peak detection with parameter `verboseBetaColumns = TRUE`.
- Add `chromPeakSummary` generic (issue #705).

## Changes in version 4.3.3

Expand Down
29 changes: 29 additions & 0 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,35 @@ setGeneric("chromPeakData<-", function(object, value)
setGeneric("chromPeakSpectra", function(object, ...)
standardGeneric("chromPeakSpectra"))

#' @title Chromatographic peak summaries
#'
#' @name chromPeakSummary
#'
#' @description
#'
#' The `chromPeakSummary()` method calculates summary statistic or other
#' metrics for each of the identified chromatographic peaks in an *xcms*
#' result object, such as the [XcmsExperiment()]. Different metrics can be
#' calculated, depending (and configured) using dedicated *parameter* classes.
#' As a result, the method returns a `matrix` or `data.frame` with one row
#' per chromatographic peak. Each column contains calculated values, depending
#' on the used method/parameter class.
#'
#' Currently implemented methods/parameter classes are:
#'
#' @return
#'
#' A `matrix` or `data.frame` with the same number of rows as there are
#' chromatographic peaks. Columns contain the calculated values. The number of
#' columns, their names and content depend on the used parameter object. See
#' the respective documentation above for more details.
#'
#' @author Pable Vangeenderhuysen, Johannes Rainer
#'
#'
setGeneric("chromPeakSummary", function(object, param, ...)
standardGeneric("chromPeakSummary"))

setGeneric("collect", function(object, ...) standardGeneric("collect"))
setGeneric("consecMissedLimit", function(object, ...)
standardGeneric("consecMissedLimit"))
Expand Down

0 comments on commit 188541c

Please sign in to comment.