diff --git a/R/groupComparisonPTM.R b/R/groupComparisonPTM.R index 1ceae33..3f9ed46 100644 --- a/R/groupComparisonPTM.R +++ b/R/groupComparisonPTM.R @@ -19,10 +19,8 @@ #' function \code{\link[MSstatsPTM]{dataSummarizationPTM}} or #' \code{\link[MSstatsPTM]{dataSummarizationPTM_TMT}} depending on acquisition #' type. -#' @param ptm_label_type Indicator of labeling type for PTM dataset. Must be one -#' of `LF` or `TMT` -#' @param protein_label_type Indicator of labeling type for PROTEIN dataset. -#' Must be one of `LF` or `TMT` +#' @param data.type Type of data. Must be one of `LF` or `TMT`. Will be deprecated +#' in favor of ptm_label_type and protein_label_type. #' @param contrast.matrix comparison between conditions of interests. Default #' models full pairwise comparison between all conditions #' @param moderated For TMT experiments only. TRUE will moderate t statistic; @@ -44,6 +42,10 @@ #' If not provided, such a file will be created automatically. #' If `append = TRUE`, has to be a valid path to a file. #' @param base start of the file name. +#' @param ptm_label_type Indicator of labeling type for PTM dataset. Must be one +#' of `LF` or `TMT` +#' @param protein_label_type Indicator of labeling type for PROTEIN dataset. +#' Must be one of `LF` or `TMT` #' @return list of modeling results. Includes PTM, PROTEIN, and ADJUSTED #' data.tables with their corresponding model results. #' @@ -54,8 +56,7 @@ #' protein_label_type="LF", #' verbose = FALSE) groupComparisonPTM = function(data, - ptm_label_type, - protein_label_type, + data.type = NULL, contrast.matrix = "pairwise", moderated = FALSE, adj.method = "BH", @@ -65,7 +66,9 @@ groupComparisonPTM = function(data, append = FALSE, verbose = TRUE, log_file_path = NULL, - base = "MSstatsPTM_log_") { + base = "MSstatsPTM_log_", + ptm_label_type = "LF", + protein_label_type = "LF") { ## Start log # if (is.null(log_file_path) & use_log_file == TRUE){ @@ -88,6 +91,10 @@ groupComparisonPTM = function(data, # pkg_name = pkg) # getOption(option_log)("INFO", "Starting parameter and data checks..") + if (!is.null(data.type) && (data.type == "TMT" || data.type == "LF")) { + ptm_label_type = data.type + protein_label_type = data.type + } Label = Site = NULL @@ -235,6 +242,12 @@ groupComparisonPTM = function(data, 'Model.Details'=list('PTM'=ptm_model_details, 'PROTEIN'=protein_model_details)) } + + if (!is.null(data.type) && (data.type == "TMT" || data.type == "LF")) { + warning("DEPRECATION NOTICE: The `data.type` argument is being deprecated. + Please use `ptm_label_type` and `protein_label_type` instead ahead + of Release 3.22") + } return(models) diff --git a/man/groupComparisonPTM.Rd b/man/groupComparisonPTM.Rd index 6c76a62..48c7095 100644 --- a/man/groupComparisonPTM.Rd +++ b/man/groupComparisonPTM.Rd @@ -6,8 +6,9 @@ \usage{ groupComparisonPTM( data, - ptm_label_type, - protein_label_type, + data.type = NULL, + ptm_label_type = "LF", + protein_label_type = "LF", contrast.matrix = "pairwise", moderated = FALSE, adj.method = "BH", @@ -26,6 +27,9 @@ function \code{\link[MSstatsPTM]{dataSummarizationPTM}} or \code{\link[MSstatsPTM]{dataSummarizationPTM_TMT}} depending on acquisition type.} +\item{data.type}{Type of data. Must be one of \code{LF} or \code{TMT}. Will be deprecated +in favor of ptm_label_type and protein_label_type.} + \item{ptm_label_type}{Indicator of labeling type for PTM dataset. Must be one of \code{LF} or \code{TMT}}