Skip to content

Commit

Permalink
ui: use corrected retention times in get_peaktable unless otherwise…
Browse files Browse the repository at this point in the history
… specified
  • Loading branch information
ethanbass committed Feb 2, 2024
1 parent 489cf7c commit e922cde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
9 changes: 7 additions & 2 deletions R/get_peaktable.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@
#' @param response Indicates whether peak area or peak height is to be used
#' as intensity measure. Defaults to `area` setting.
#' @param use.cor Logical. Indicates whether to use corrected retention times
#' (by default) or raw retention times (not advised!).
#' (\code{rt.cor} column) or raw retention times (\code{rt} column). Unless
#' otherwise specified, the \code{rt.cor} column will be used by default if it
#' exists in the provided \code{peak_list}.
#' @param hmax Height at which the complete linkage dendrogram will be cut. Can
#' be interpreted as the maximal inter-cluster retention time difference.
#' @param plot_it Logical. If TRUE, for every component a stripplot will be
Expand Down Expand Up @@ -91,14 +93,17 @@
#' @export get_peaktable

get_peaktable <- function(peak_list, chrom_list, response = c("area", "height"),
use.cor = FALSE, hmax = 0.2, plot_it = FALSE,
use.cor = NULL, hmax = 0.2, plot_it = FALSE,
ask = plot_it, clust = c("rt","sp.rt"),
sigma.t = NULL, sigma.r = 0.5,
deepSplit = FALSE, verbose = FALSE,
out = c('data.frame', 'matrix')){
response <- match.arg(response, c("area", "height"))
clust <- match.arg(clust, c("rt","sp.rt"))
out <- match.arg(out, c('data.frame', 'matrix'))
if (is.null(use.cor)){
use.cor <- "rt.cor" %in% colnames(peak_list[[1]][[1]])
}
rt <- ifelse(use.cor, "rt.cor", "rt")
start <- ifelse(use.cor, "start.cor", "start")
end <- ifelse(use.cor, "end.cor", "end")
Expand Down
6 changes: 4 additions & 2 deletions man/get_peaktable.Rd

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

0 comments on commit e922cde

Please sign in to comment.