Skip to content

Commit

Permalink
Add findpeaks for GCIMSSpectrum
Browse files Browse the repository at this point in the history
  • Loading branch information
lalo-caballero committed Feb 26, 2024
1 parent cccb778 commit 271bb63
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions R/findPeaks-GCIMSChromatogram.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,26 @@ setMethod(
object
}
)

#' Peak detection for a GCIMSSpectrum
#' @param object A [GCIMSSpectrum] object
#' @inheritDotParams findPeaksImpl1D -x -y
#' @return The modified [GCIMSSpectrum], with a peak list
#' @family GCIMSSpectrum
#' @export
setMethod(
"findPeaks",
"GCIMSSpectrum",
function(object, ...) {
dt <- dtime(object)
intens <- intensity(object)
peak_list_and_debug_info <- findPeaksImpl1D(
x = dt,
y = intens,
...
)
object@peaks_debug_info <- peak_list_and_debug_info$debug_info
peaks(object) <- peak_list_and_debug_info$peak_list
object
}
)

0 comments on commit 271bb63

Please sign in to comment.