Skip to content

Commit

Permalink
quick fixes to docu
Browse files Browse the repository at this point in the history
  • Loading branch information
philouail committed Mar 7, 2024
1 parent fe33e10 commit def1ba7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 22 deletions.
21 changes: 11 additions & 10 deletions R/AllGenerics.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ setGeneric("addProcessHistory", function(object, ...)
#' function.
#'
#' - `LamaParama`: This function performs retention time correction by aligning
#' chromatographic data to an external reference dataset. The process
#' involves identifying and aligning peaks within the experimental
#' chromatographic data, represented as an `XcmsExperiment` object, to a
#' predefined set of landmark features called "lamas". These landmark features
#' are characterized by their mass-to-charge ratio (m/z) and retention time.
#' chromatographic data to an external reference dataset (method by Carl
#' Brunius).The process involves identifying and aligning peaks within the
#' experimental chromatographic data, represented as an `XcmsExperiment`
#' object, to a predefined set of landmark features called "lamas". These
#' landmark features are characterized by their mass-to-charge ratio (m/z)
#' and retention time.
#'
#' The alignment algorithm matches chromatographic peaks from the experimental
#' data to the lamas, fitting a model based on this match to adjust their
Expand All @@ -74,10 +75,10 @@ setGeneric("addProcessHistory", function(object, ...)
#' `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 ChromPeaks 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 ChromPeaks, by first running `[matchLamasChromPeaks()]`.
#' 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()]`.
#'
#' Different warping methods are available; users can choose to fit a loess
#' (`method = "loess"`, the default) or a gam (`method = "gam"`) between the
Expand Down Expand Up @@ -294,7 +295,7 @@ setGeneric("addProcessHistory", function(object, ...)
#'
#' @seealso [plotAdjustedRtime()] for visualization of alignment results.
#'
#' @author Colin Smith, Johannes Rainer
#' @author Colin Smith, Johannes Rainer, Philippine Louail, Carl Brunius
#'
#' @references
#'
Expand Down
8 changes: 8 additions & 0 deletions R/do_adjustRtime-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#' times of the pairs of matched peaks. This `data.frame` can be used
#' in `.adjust_rt_model`'s parameter `rt_raw`.
#'
#' @author Johannes Rainer, Philippine Louail
#'
#' @noRd
#'
#' @importFrom MetaboCoreUtils mclosest
Expand All @@ -633,6 +635,8 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#' *observed* retention times of matching peaks in the same sample from
#' which the retention times in `rt_raw` are.
#'
#' @author Carl Brunius
#'
#' @noRd
.adjust_rt_model <- function(rt_raw,
method = c("loess", "gam"),
Expand Down Expand Up @@ -672,6 +676,8 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#'
#' @importFrom stats loess predict resid
#'
#' @author Carl Brunius, Philippine Louail
#'
#' @noRd
.rt_model <- function(method = c("loess", "gam"),
rt_map, span = 0.5,
Expand Down Expand Up @@ -737,6 +743,8 @@ adjustRtimeSubset <- function(rtraw, rtadj, subset,
#' calling [adjustRtime()] with the same `LamaParama` and `XcmsExperiment`
#' object.
#'
#' @author Philippine Louail
#'
#' @rdname adjustRtime
matchLamasChromPeaks <- function(object, param, BPPARAM = bpparam()){
if(!hasChromPeaks(object))
Expand Down
7 changes: 5 additions & 2 deletions inst/NEWS
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
Changes in version 4.1.10
----------------------

- Implementation of the `LamaParama` class and method for the `AdjustRtime()`
- Implementation of the `LamaParama` class and method for the `adjustRtime()`
function. Allowing alignment of a dataset based on landmarks (lamas) from an
external reference dataset
external reference dataset.
- Implementation of related user-level function `matchLamasChromPeaks()` which
allows for pre evaluation of matching between lamas and chromPeaks before
alignment.

Changes in version 4.1.9
----------------------
Expand Down
23 changes: 13 additions & 10 deletions man/adjustRtime.Rd

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

0 comments on commit def1ba7

Please sign in to comment.