Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 20 additions & 7 deletions R/groupComparisonPTM.R
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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.
#'
Expand All @@ -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",
Expand All @@ -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){
Expand All @@ -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

Expand Down Expand Up @@ -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)

Expand Down
8 changes: 6 additions & 2 deletions man/groupComparisonPTM.Rd

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

Loading