Perform a test for post-translational modifications. If testType is "welch", the functions applies a Welch t-test to the log-fold changes obtained from independent tests on the peptide and protein levels. This effectively 'adjusts' the changes on the peptide level for the changes seen in the corresponding protein. This approach is similar to the method implemented in the MSstatsPTM package (Kohler et al 2022). If testType is "interaction", data from the peptide and protein level are concatenated, and a model is fit to test for the significance of the interaction between the "value type" and the condition, i.e., whether the difference between the groups depend on whether we are considering the peptide or the protein-level abundances.

runPTMTest(
  sceProteins,
  scePeptides,
  matchColProteins,
  matchColPeptides,
  testType,
  comparisons,
  groupComposition = NULL,
  assayForTests,
  assayImputation = NULL,
  minNbrValidValues = 0,
  minlFC = 0,
  volcanoAdjPvalThr = 0.05,
  volcanoLog2FCThr = 1,
  baseFileName = NULL,
  singleFit = FALSE,
  subtractBaseline = FALSE,
  baselineGroup = "",
  extraColumnsPeptides = NULL
)

Arguments

sceProteins

A SummarizedExperiment object (or a derivative) with protein-level abundances.

scePeptides

A SummarizedExperiment object (or a derivative) with peptide-level abundances.

matchColProteins, matchColPeptides

Character scalars indicating columns of rowData(sceProteins) and rowData(scePeptides), respectively, that will be used to extract matching record pairs. Typically, this will be a column with the protein identifier.

testType

Either "welch" or "interaction", the type of test to perform. See Details for a description.

comparisons

A list of character vectors of length 2, each giving the two groups to be compared.

groupComposition

A list providing the composition of each group used in any of the comparisons. If NULL, assumes that each group used in comparisons consists of a single group in the group column of colData(sceProteins) and colData(scePeptides).

assayForTests

Character scalar, the name of an assay of the SummarizedExperiment object with values that will be used to perform the test.

assayImputation

Character scalar, the name of an assay of sce with logical values indicating whether an entry was imputed or not.

minNbrValidValues

Numeric scalar, the minimum number of valid (non-imputed) values that must be present for a features to include it in the result table.

minlFC

Non-negative numeric scalar, the logFC threshold to use for limma-treat. If minlFC = 0, limma::eBayes is used instead.

volcanoAdjPvalThr

Numeric scalar giving the FDR threshold for significance (for later use in volcano plots).

volcanoLog2FCThr

Numeric scalar giving the logFC threshold for significance (for later use in volcano plots).

baseFileName

Character scalar or NULL, the base file name of the output text files. If NULL, no result files are generated.

singleFit

Logical scalar, whether to fit a single model to the full data set and extract relevant results using contrasts. If FALSE, the data set will be subset for each comparison to only the relevant samples.

subtractBaseline

Logical scalar, whether to subtract the background/ reference value for each feature in each batch before fitting the model. If TRUE, requires that a 'batch' column is available.

baselineGroup

Character scalar representing the reference group. Only used if subtractBaseline is TRUE, in which case the abundance values for a given sample will be adjusted by subtracting the average value across all samples in the baselineGroup from the same batch as the original sample.

extraColumnsPeptides

Character vector (or NULL) indicating columns of rowData(scePeptides) to include in the result table.

Value

A list with the following components:

  • tests - a list with test results

  • plotnotes - the prior df used by limma

  • plottitles - indicating the type of test

  • plotsubtitles - indicating the significance thresholds

  • messages - any messages for the user

  • design - information about the experimental design

In addition, if baseFileName is not NULL, text files with test results (including only features passing the imposed significance thresholds) are saved.

References

Kohler D, Tsai T-H, Vershueren E, Huang T, Hinkle T, Phu L, Choi M, Vitek O: MSstatsPTM: Statistical relative quantification of post-translational modifiations in bottom-up mass spectrometry-based proteomics. Molecular and Cellular Proteomics (2022).

Author

Charlotte Soneson