Skip to content

Commit

Permalink
update johannes comments
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Mar 19, 2024
1 parent f1b1252 commit 539c30e
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion R/XcmsExperiment.R
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,7 @@ setMethod(
rtMap <- param@rtMap
if (length(rtMap) != length(object))
stop("Mismatch between the number of files matched to lamas: ",
length(rtMap), "and files in the object: ", length(object))
length(rtMap), " and files in the object: ", length(object))

# Make model and adjust retention for each file
rt_adj <- bpmapply(rtMap, rt_raw, idx, FUN = function(x, y, i, param) {
Expand Down
40 changes: 20 additions & 20 deletions R/do_adjustRtime-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -593,23 +593,23 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#'
#' @description
#' Alignment is achieved using the ['adjustRtime()'] method with a `param` of
#' class `LamaParama`. This method #' corrects retention time by aligning
#' chromatographic data with an external reference dataset. Peaks in the
#' experimental chromatographic data are aligned to predefined landmark
#' features called "lamas" based on their mass-to-charge ratio (m/z) and
#' retention time.
#'
#' This alignment algorithm matches chromatographic peaks from the experimental
#' data to the lamas, fitting a model based on this match to adjust their
#' retention times and minimize discrepancies. This adjustment is performed
#' file by file. Adjustable parameters such as `ppm`, `tolerance`, and
#' `toleranceRt` define acceptable deviations during the matching process.
#' It's crucial to note that only lamas and chromatographic peaks exhibiting a
#' one-to-one mapping are considered when estimating retention time shifts. If
#' a file has no peaks matching with lamas, no adjustment will be performed,
#' and the file will be returned as-is. Users can evaluate this matching, for
#' example, by checking the number of matches and ranges of the matching
#' peaks, by first running `[matchLamasChromPeaks()]`.
#' class `LamaParama`. This method corrects retention time by aligning
#' chromatographic data with an external reference dataset.
#'
#' Chromatographic peaks in the experimental data are first matched to
#' predefined (external) landmark features based on their mass-to-charge ratio
#' and retention time and subsequently the data is aligned by minimizing the
#' differences in retention times between the matched chromatographic peaks and
#' lamas. This adjustment is performed file by file.
#'
#' Adjustable parameters such as `ppm`, `tolerance`, and `toleranceRt` define
#' acceptable deviations during the matching process. It's crucial to note that
#' only lamas and chromatographic peaks exhibiting a one-to-one mapping are
#' considered when estimating retention time shifts. If a file has no peaks
#' matching with lamas, no adjustment will be performed, and the the retention
#' times will be returned as-is. Users can evaluate this matching, for example,
#' by checking the number of matches and ranges of the matching peaks, by first
#' running `[matchLamasChromPeaks()]`.
#'
#' Different warping methods are available; users can choose to fit a *loess*
#' (`method = "loess"`, the default) or a *gam* (`method = "gam"`) between the
Expand All @@ -622,9 +622,9 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#'
#' Other functions related to this method:
#'
#' - `LamaParama()`: return the respective the parameter object for alignment
#' using `adjustRtime()` function. Is also the input for functions listed
#' below.
#' - `LamaParama()`: return the respective parameter object for alignment
#' using `adjustRtime()` function. It is also the input for the functions
#' listed below.
#'
#' - `matchLamasChromPeaks()`: quickly matches each file's ChromPeaks
#' to Lamas, allowing the user to evaluate the matches for each file.
Expand Down
40 changes: 20 additions & 20 deletions man/LamaParama.Rd

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

0 comments on commit 539c30e

Please sign in to comment.