Perform differential analysis on MS-based proteomics experiments targeting PTMs
Source:R/groupComparisonPTM.R
groupComparisonPTM.RdTakes summarized PTM and protein data from dataSummarizationPTM or
dataSummarizationPTM_TMT functions and performs differential analysis.
Leverages unmodified protein data to perform adjustment and deconvolute the
effect of the PTM and unmodified protein. If protein data is unavailable,
PTM data can still be passed into the function, however adjustment can not be
performed. All model results are returned for completeness.
Usage
groupComparisonPTM(
data,
data.type = NULL,
contrast.matrix = "pairwise",
moderated = FALSE,
adj.method = "BH",
log_base = 2,
save_fitted_models = TRUE,
use_log_file = TRUE,
append = FALSE,
verbose = TRUE,
log_file_path = NULL,
base = "MSstatsPTM_log_",
ptm_label_type = "LF",
protein_label_type = "LF"
)Arguments
- data
list of summarized datasets. Output of MSstatsPTM summarization function
dataSummarizationPTMordataSummarizationPTM_TMTdepending on acquisition type.- data.type
Type of data. Must be one of
LForTMT. Will be deprecated in favor of ptm_label_type and protein_label_type.- contrast.matrix
comparison between conditions of interests. Default models full pairwise comparison between all conditions
- moderated
For TMT experiments only. TRUE will moderate t statistic; FALSE (default) uses ordinary t statistic. Default is FALSE.
- adj.method
For TMT experiments only. Adjusted method for multiple comparison. "BH" is default. "BH" is used for all other experiment types
- log_base
For non-TMT experiments only. The base of the logarithm used in summarization.
- save_fitted_models
logical, if TRUE, fitted models will be added to the output.
- use_log_file
logical. If TRUE, information about data processing will be saved to a file.
- append
logical. If TRUE, information about data processing will be added to an existing log file.
- verbose
logical. If TRUE, information about data processing will be printed to the console.
- log_file_path
character. Path to a file to which information about data processing will be saved. If not provided, such a file will be created automatically. If
append = TRUE, has to be a valid path to a file.- base
start of the file name.
- ptm_label_type
Indicator of labeling type for PTM dataset. Must be one of
LForTMT- protein_label_type
Indicator of labeling type for PROTEIN dataset. Must be one of
LForTMT
Value
list of modeling results. Includes PTM, PROTEIN, and ADJUSTED data.tables with their corresponding model results.
Examples
model.lf.msstatsptm = groupComparisonPTM(summary.data,
ptm_label_type="LF",
protein_label_type="LF",
verbose = FALSE)
#> Starting PTM modeling...
#> INFO [2026-04-09 15:19:37] == Start to test and get inference in whole plot ...
#>
|
| | 0%
|
|= | 1%
|
|= | 2%
|
|== | 2%
|
|== | 3%
|
|=== | 4%
|
|=== | 5%
|
|==== | 6%
|
|===== | 7%
|
|====== | 8%
|
|====== | 9%
|
|======= | 10%
|
|======== | 11%
|
|======== | 12%
|
|========= | 12%
|
|========= | 13%
|
|========== | 14%
|
|========== | 15%
|
|=========== | 16%
|
|============ | 17%
|
|============= | 18%
|
|============= | 19%
|
|============== | 20%
|
|============== | 21%
|
|=============== | 21%
|
|================ | 22%
|
|================ | 23%
|
|================= | 24%
|
|================= | 25%
|
|================== | 26%
|
|=================== | 26%
|
|=================== | 27%
|
|==================== | 28%
|
|==================== | 29%
|
|===================== | 30%
|
|===================== | 31%
|
|====================== | 31%
|
|======================= | 32%
|
|======================= | 33%
|
|======================== | 34%
|
|======================== | 35%
|
|========================= | 36%
|
|========================== | 37%
|
|=========================== | 38%
|
|=========================== | 39%
|
|============================ | 40%
|
|============================= | 41%
|
|============================== | 42%
|
|============================== | 43%
|
|=============================== | 44%
|
|=============================== | 45%
|
|================================ | 45%
|
|================================ | 46%
|
|================================= | 47%
|
|================================== | 48%
|
|================================== | 49%
|
|=================================== | 50%
|
|==================================== | 51%
|
|==================================== | 52%
|
|===================================== | 53%
|
|====================================== | 54%
|
|====================================== | 55%
|
|======================================= | 55%
|
|======================================= | 56%
|
|======================================== | 57%
|
|======================================== | 58%
|
|========================================= | 59%
|
|========================================== | 60%
|
|=========================================== | 61%
|
|=========================================== | 62%
|
|============================================ | 63%
|
|============================================= | 64%
|
|============================================== | 65%
|
|============================================== | 66%
|
|=============================================== | 67%
|
|=============================================== | 68%
|
|================================================ | 69%
|
|================================================= | 69%
|
|================================================= | 70%
|
|================================================== | 71%
|
|================================================== | 72%
|
|=================================================== | 73%
|
|=================================================== | 74%
|
|==================================================== | 74%
|
|===================================================== | 75%
|
|===================================================== | 76%
|
|====================================================== | 77%
|
|====================================================== | 78%
|
|======================================================= | 79%
|
|======================================================== | 79%
|
|======================================================== | 80%
|
|========================================================= | 81%
|
|========================================================= | 82%
|
|========================================================== | 83%
|
|=========================================================== | 84%
|
|============================================================ | 85%
|
|============================================================ | 86%
|
|============================================================= | 87%
|
|============================================================= | 88%
|
|============================================================== | 88%
|
|============================================================== | 89%
|
|=============================================================== | 90%
|
|================================================================ | 91%
|
|================================================================ | 92%
|
|================================================================= | 93%
|
|================================================================== | 94%
|
|=================================================================== | 95%
|
|=================================================================== | 96%
|
|==================================================================== | 97%
|
|==================================================================== | 98%
|
|===================================================================== | 98%
|
|===================================================================== | 99%
|
|======================================================================| 100%
#> INFO [2026-04-09 15:19:39] == Comparisons for all proteins are done.
#> Starting Protein modeling...
#> INFO [2026-04-09 15:19:39] == Start to test and get inference in whole plot ...
#>
|
| | 0%
|
|=== | 4%
|
|===== | 8%
|
|======== | 12%
|
|=========== | 15%
|
|============= | 19%
|
|================ | 23%
|
|=================== | 27%
|
|====================== | 31%
|
|======================== | 35%
|
|=========================== | 38%
|
|============================== | 42%
|
|================================ | 46%
|
|=================================== | 50%
|
|====================================== | 54%
|
|======================================== | 58%
|
|=========================================== | 62%
|
|============================================== | 65%
|
|================================================ | 69%
|
|=================================================== | 73%
|
|====================================================== | 77%
|
|========================================================= | 81%
|
|=========================================================== | 85%
|
|============================================================== | 88%
|
|================================================================= | 92%
|
|=================================================================== | 96%
|
|======================================================================| 100%
#> INFO [2026-04-09 15:19:40] == Comparisons for all proteins are done.
#> Starting adjustment...