MSstatsTMT : A package for protein significance analysis in shotgun mass spectrometry-based proteomic experiments with tandem mass tag (TMT) labeling

Ting Huang (thuang0703@gmail.com), Meena Choi (mnchoi67@gmail.com), Mateusz Staniak (mtst@mstaniak.pl), Sicheng Hao (hao.sic@husky.neu.edu), Olga Vitek(o.vitek@northeastern.edu)

2026-08-31

0. Load MSstatsTMT

Load MSstatsTMT first. Then you are ready to start MSstatsTMT

# ## Install MSstatsTMT package from Bioconductor
# if (!requireNamespace("BiocManager", quietly = TRUE))
#   install.packages("BiocManager")
# 
# BiocManager::install("MSstatsTMT")

library(MSstatsTMT)

This vignette summarizes the introduction and various options of all functionalities in MSstatsTMT.

MSstatsTMT includes the following three steps for statistical testing:

  1. Converters for different peptide quantification tools to get the input with required format: PDtoMSstatsTMTFormat, MaxQtoMSstatsTMTFormat, SpectroMinetoMSstatsTMTFormat, OpenMStoMSstatsTMTFormat and PhilosophertoMSstatsTMTFormat.
  2. Protein summarization based on peptide quantification data: proteinSummarization
  3. Group comparison on protein quantification data: groupComparisonTMT

1. Converters for different peptide quantification tools

MSstatsTMT performs statistical analysis steps, that follow peptide identification and quantitation. Therefore, input to MSstatsTMT is the output of other software tools (such as Proteome Discoverer, MaxQuant and so on) that read raw spectral files , identify and quantify peptide ions. The preferred structure of data for use in MSstatsTMT is a .csv file in a long format with at least 9 columns representing the following variables: ProteinName, PeptideSequence, Charge, PSM, Channel, Condition, BioReplicate, Mixture, Intensity. The variable names are fixed, but are case-insensitive.

#> INFO  [2026-08-31 18:26:49] ** Raw data from ProteomeDiscoverer imported successfully.
#> INFO  [2026-08-31 18:26:49] ** Raw data from ProteomeDiscoverer cleaned successfully.
#> INFO  [2026-08-31 18:26:49] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:49] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:49] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:49] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:49] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:49] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:49] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:49] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:49] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:49] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:49] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:49] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
#>   ProteinName   PeptideSequence Charge                 PSM  Mixture
#> 1      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 2      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 3      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 4      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 5      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 6      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#>   TechRepMixture                                         Run Channel
#> 1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw     126
#> 2              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 3              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 4              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128C
#> 5              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128N
#> 6              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    129C
#>   BioReplicate Condition Intensity
#> 1         Norm      Norm  161165.0
#> 2        0.125     0.125  185221.3
#> 3        0.667     0.667  154305.6
#> 4            1         1  183209.7
#> 5          0.5       0.5  150003.8
#> 6          0.5       0.5  169843.5

PDtoMSstatsTMTFormat()

Preprocess PSM data from Proteome Discoverer and convert into the required input format for MSstatsTMT.

Arguments

  • input : data name of Proteome discover PSM output. Read PSM sheet.
  • annotation : data frame which contains column Run, Fraction, TechRepMixture, Channel, Condition, BioReplicate, Mixture.
  • which.proteinid : Use Protein.Accessions(default) column for protein name. Master.Protein.Accessions can be used instead.
  • useNumProteinsColumn : TURE(default) remove shared peptides by information of # Proteins column in PSM sheet.
  • useUniquePeptide : TRUE(default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
  • rmPSM_withfewMea_withinRun : only for rmPSM_withMissing_withinRun = FALSE. TRUE(default) will remove the features that have 1 or 2 measurements within each Run.
  • removeProtein_with1Peptide : TRUE will remove the proteins which have only 1 peptide and charge. Default is FALSE.
  • summaryforMultipleRows : sum(default) or max - when there are multiple measurements for certain PSM in certain run, select the PSM with the largest summation or maximal value.

Example

# read in PD PSM sheet
# raw.pd <- read.delim("161117_SILAC_HeLa_UPS1_TMT10_5Mixtures_3TechRep_UPSdB_Multiconsensus_PD22_Intensity_PSMs.txt")
raw.pd = data.table::fread(system.file("tinytest/raw_data/PDTMT/pdtmt_input.csv",
                                       package = "MSstatsConvert"))
head(raw.pd)
#>    Checked Confidence Identifying.Node PSM.Ambiguity
#>     <lgcl>     <char>           <char>        <char>
#> 1:   FALSE       High      Mascot (F2)   Unambiguous
#> 2:   FALSE       High      Mascot (F2)      Selected
#> 3:   FALSE       High      Mascot (F2)   Unambiguous
#> 4:   FALSE       High      Mascot (K2)   Unambiguous
#> 5:   FALSE       High      Mascot (E2)   Unambiguous
#> 6:   FALSE       High      Mascot (K2)   Unambiguous
#>               Annotated.Sequence
#>                           <char>
#> 1:             [K].aGLVDDFEk.[K]
#> 2:            [K].yTAQVDAEEk.[E]
#> 3:            [K].scAEWVSLSk.[A]
#> 4:     [R].lAALPENPPAIDWAYYk.[A]
#> 5: [K].nLIPFDQMTIEDLNEAFPETk.[L]
#> 6: [K].nLIPFDQMTIEDLNEAFPETk.[L]
#>                                        Modifications Marked.as
#>                                               <char>    <lgcl>
#> 1:                       N-Term(TMT6plex); K9(Label)        NA
#> 2:                      N-Term(TMT6plex); K10(Label)        NA
#> 3: N-Term(TMT6plex); C2(Carbamidomethyl); K10(Label)        NA
#> 4:                      N-Term(TMT6plex); K17(Label)        NA
#> 5:                      N-Term(TMT6plex); K21(Label)        NA
#> 6:                      N-Term(TMT6plex); K21(Label)        NA
#>    X..Protein.Groups X..Proteins Master.Protein.Accessions
#>                <int>       <int>                    <char>
#> 1:                 1           1                    O75947
#> 2:                 1           1                    O75947
#> 3:                 1           1                    O75947
#> 4:                 1           1                    O75947
#> 5:                 1           1                    O75947
#> 6:                 1           1                    O75947
#>                                                 Master.Protein.Descriptions
#>                                                                      <char>
#> 1: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 2: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 3: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 4: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 5: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 6: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#>    Protein.Accessions
#>                <char>
#> 1:             O75947
#> 2:             O75947
#> 3:             O75947
#> 4:             O75947
#> 5:             O75947
#> 6:             O75947
#>                                                        Protein.Descriptions
#>                                                                      <char>
#> 1: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 2: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 3: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 4: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 5: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#> 6: ATP synthase subunit d, mitochondrial OS=Homo sapiens GN=ATP5H PE=1 SV=3
#>    X..Missed.Cleavages Charge DeltaScore DeltaCn  Rank Search.Engine.Rank
#>                  <int>  <int>      <num>   <int> <int>              <int>
#> 1:                   0      2     0.8596       0     1                  1
#> 2:                   0      2     0.8148       0     1                  1
#> 3:                   0      2     1.0000       0     1                  1
#> 4:                   0      3     1.0000       0     1                  1
#> 5:                   0      3     1.0000       0     1                  1
#> 6:                   0      3     1.0000       0     1                  1
#>    m.z..Da. MH...Da. Theo..MH...Da. DeltaM..ppm. Deltam.z..Da. Activation.Type
#>       <num>    <num>          <num>        <num>         <num>          <char>
#> 1: 730.4188 1459.830       1459.829         0.98       0.00072             CID
#> 2: 810.4426 1619.878       1619.877         0.47       0.00038             CID
#> 3: 816.9493 1632.891       1632.891         0.11       0.00009             CID
#> 4: 800.1158 2398.333       2398.330         1.14       0.00091             CID
#> 5: 977.8480 2931.530       2931.531        -0.35      -0.00034             CID
#> 6: 977.8486 2931.531       2931.531         0.28       0.00027             CID
#>    MS.Order Isolation.Interference.... Average.Reporter.S.N
#>      <char>                      <num>                <num>
#> 1:      MS2                  18.090500                 96.4
#> 2:      MS2                   0.000000                 60.7
#> 3:      MS2                   9.513375                 32.7
#> 4:      MS2                   1.856572                 55.4
#> 5:      MS2                   0.000000                 49.6
#> 6:      MS2                   7.547185                115.6
#>    Ion.Inject.Time..ms. RT..min. First.Scan
#>                   <num>    <num>      <int>
#> 1:                4.487 137.2936      69661
#> 2:               12.734  87.6992      41240
#> 3:                6.282 136.2357      69068
#> 4:                3.360 187.3983     100604
#> 5:               28.973 210.5029     106195
#> 6:                9.422 209.0431     112593
#>                                   Spectrum.File File.ID Abundance..126
#>                                          <char>  <char>          <num>
#> 1: 161117_SILAC_HeLa_UPS1_TMT10_Mixture4_02.raw     F10      210279.82
#> 2: 161117_SILAC_HeLa_UPS1_TMT10_Mixture4_02.raw     F10       54954.12
#> 3: 161117_SILAC_HeLa_UPS1_TMT10_Mixture4_02.raw     F10      115579.32
#> 4: 161117_SILAC_HeLa_UPS1_TMT10_Mixture3_03.raw      F5      270762.08
#> 5: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw     F11       22598.48
#> 6: 161117_SILAC_HeLa_UPS1_TMT10_Mixture3_03.raw      F5      177406.52
#>    Abundance..127N Abundance..127C Abundance..128N Abundance..128C
#>              <num>           <num>           <num>           <num>
#> 1:       235139.89       199617.17       246666.41       224093.69
#> 2:        55770.69        48058.88        57852.26        61473.29
#> 3:       107912.14       103470.18       120936.66       107018.74
#> 4:       247508.30       242426.72       283697.08       245179.37
#> 5:        25294.14        28480.69        27705.62        25350.34
#> 6:       166090.39       160460.28       166123.04       184250.68
#>    Abundance..129N Abundance..129C Abundance..130N Abundance..130C
#>              <num>           <num>           <num>           <num>
#> 1:       201656.50       223409.68       228672.44       199732.60
#> 2:        57852.35        57605.35        58872.19        55028.50
#> 3:        96292.90       124681.25        93858.60       103810.51
#> 4:       243026.51       286024.96       244177.27       260124.49
#> 5:        22954.42        30383.71        27519.42        25462.64
#> 6:       170057.22       168742.33       179235.66       180967.64
#>    Abundance..131 Quan.Info Ions.Score Identity.Strict Identity.Relaxed
#>             <num>    <lgcl>      <int>           <int>            <int>
#> 1:      215496.05        NA         57              29               22
#> 2:       47199.82        NA         54              29               22
#> 3:      105998.06        NA         71              29               22
#> 4:      229361.11        NA         34              30               23
#> 5:       24437.22        NA         38              29               22
#> 6:      158507.64        NA         32              29               22
#>    Expectation.Value Percolator.q.Value Percolator.PEP
#>                <num>              <num>          <num>
#> 1:      1.755979e-05                  0      9.366e-05
#> 2:      3.831961e-05                  0      9.221e-06
#> 3:      7.285896e-07                  0      1.637e-06
#> 4:      3.974714e-03                  0      2.186e-05
#> 5:      1.461695e-03                  0      1.625e-05
#> 6:      5.319327e-03                  0      3.834e-06

# Read in annotation including condition and biological replicates per run and channel.
# Users should make this annotation file. It is not the output from Proteome Discoverer.
# annotation.pd <- read.csv(file="PD_Annotation.csv", header=TRUE)
annotation.pd = data.table::fread(system.file("tinytest/raw_data/PDTMT/pd_annotation.csv",
                                              package = "MSstatsConvert"))
head(annotation.pd)
#>                                             Run Fraction TechRepMixture Channel
#>                                          <char>    <int>          <int>  <char>
#> 1: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1     126
#> 2: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1    127N
#> 3: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1    127C
#> 4: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1    128N
#> 5: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1    128C
#> 6: 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01.raw        1              1    129N
#>    Condition  Mixture BioReplicate
#>       <char>   <char>       <char>
#> 1:      Norm Mixture1         Norm
#> 2:     0.667 Mixture1        0.667
#> 3:     0.125 Mixture1        0.125
#> 4:       0.5 Mixture1          0.5
#> 5:         1 Mixture1            1
#> 6:     0.125 Mixture1        0.125

# use Protein.Accessions as protein name
input.pd <- PDtoMSstatsTMTFormat(raw.pd, annotation.pd,
                                 which.proteinid = "Protein.Accessions")
#> INFO  [2026-08-31 18:26:49] ** Raw data from ProteomeDiscoverer imported successfully.
#> INFO  [2026-08-31 18:26:49] ** Raw data from ProteomeDiscoverer cleaned successfully.
#> INFO  [2026-08-31 18:26:49] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:49] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:49] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:49] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:49] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:49] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:50] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:50] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:50] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:50] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:50] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:50] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.pd)
#>   ProteinName   PeptideSequence Charge                 PSM  Mixture
#> 1      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 2      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 3      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 4      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 5      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 6      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#>   TechRepMixture                                         Run Channel
#> 1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw     126
#> 2              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 3              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 4              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128C
#> 5              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128N
#> 6              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    129C
#>   BioReplicate Condition Intensity
#> 1         Norm      Norm  161165.0
#> 2        0.125     0.125  185221.3
#> 3        0.667     0.667  154305.6
#> 4            1         1  183209.7
#> 5          0.5       0.5  150003.8
#> 6          0.5       0.5  169843.5

# use Master.Protein.Accessions as protein name
input.pd.master <- PDtoMSstatsTMTFormat(raw.pd, annotation.pd,
                                 which.proteinid = "Master.Protein.Accessions")
#> INFO  [2026-08-31 18:26:50] ** Raw data from ProteomeDiscoverer imported successfully.
#> INFO  [2026-08-31 18:26:50] ** Raw data from ProteomeDiscoverer cleaned successfully.
#> INFO  [2026-08-31 18:26:50] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:50] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:50] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:50] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:50] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:50] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:50] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:50] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:51] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:51] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:51] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:51] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.pd.master)
#>   ProteinName   PeptideSequence Charge                 PSM  Mixture
#> 1      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 2      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 3      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 4      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 5      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#> 6      O75947 [K].aGLVDDFEk.[K]      2 [K].aGLVDDFEk.[K]_2 Mixture1
#>   TechRepMixture                                         Run Channel
#> 1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw     126
#> 2              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 3              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 4              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128C
#> 5              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    128N
#> 6              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    129C
#>   BioReplicate Condition Intensity
#> 1         Norm      Norm  161165.0
#> 2        0.125     0.125  185221.3
#> 3        0.667     0.667  154305.6
#> 4            1         1  183209.7
#> 5          0.5       0.5  150003.8
#> 6          0.5       0.5  169843.5

Here is the summary of pre-processing steps in PDtoMSstatsTMTFormat function.

  • Peptide ions which are shared by more than one protein are removed
  • If one spectrum has multiple identifications within one run, it only keeps the best identification with the minimal number of missing reporter ion intensities, highest reporter ion intensity, or lowest interference score if the information was available
  • If a spectrum only has one or two reporter ion intensities within one MS run, it removes the spectrum from that run
  • Ambiguous protein groups which contained multiple proteins were filtered out
  • For fractionation, If a peptide ion was shared by multiple fractions, we kept the fraction with maximal average reporter ion abundance across all the channel in the fraction.

MaxQtoMSstatsTMTFormat()

Preprocess PSM-level data from MaxQuant and convert into the required input format for MSstatsTMT.

Arguments

  • evidence : name of evidence.txt data, which includes PSM-level data.
  • proteinGroups : name of proteinGroups.txt data, which contains the detailed information of protein identifications.
  • annotation : data frame which contains column Run, Fraction, TechRepMixture, Channel, Condition, BioReplicate, Mixture.
  • which.proteinid : Use Proteins(default) column for protein name. Leading.proteins or Leading.razor.proteins can be used instead. However, those can potentially have the shared peptides.
  • rmProt_Only.identified.by.site : TRUE will remove proteins with ‘+’ in ‘Only.identified.by.site’ column from proteinGroups.txt, which was identified only by a modification site. FALSE is the default.
  • useUniquePeptide : TRUE(default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
  • rmPSM_withfewMea_withinRun : only for rmPSM_withMissing_withinRun = FALSE. TRUE(default) will remove the features that have 1 or 2 measurements within each Run.
  • removeProtein_with1Peptide : TRUE will remove the proteins which have only 1 peptide and charge. Default is FALSE.
  • summaryforMultipleRows : sum(default) or max - when there are multiple measurements for certain PSM in certain run, select the PSM with the largest summation or maximal value.

Example

# Read in MaxQuant files
# proteinGroups <- read.table("proteinGroups.txt", sep="\t", header=TRUE)
# evidence <- read.table("evidence.txt", sep="\t", header=TRUE)
evidence = data.table::fread(system.file("tinytest/raw_data/MaxQuantTMT/mq_ev.csv",
                                         package = "MSstatsConvert"))
proteinGroups = data.table::fread(system.file("tinytest/raw_data/MaxQuantTMT/mq_pg.csv",
                                              package = "MSstatsConvert"))

# Users should make this annotation file. It is not the output from MaxQuant.
# annotation.mq <- read.csv(file="MQ_Annotation.csv", header=TRUE)
annotation.mq = data.table::fread(system.file("tinytest/raw_data/MaxQuantTMT/mq_annotation.csv",
                                              package = "MSstatsConvert"))

input.mq <- MaxQtoMSstatsTMTFormat(evidence, proteinGroups, annotation.mq)
#> INFO  [2026-08-31 18:26:51] ** Raw data from MaxQuant imported successfully.
#> INFO  [2026-08-31 18:26:51] ** Rows with values of Potentialcontaminant equal to + are removed 
#> INFO  [2026-08-31 18:26:51] ** Rows with values of Reverse equal to + are removed 
#> INFO  [2026-08-31 18:26:51] ** Rows with values of Potentialcontaminant equal to + are removed 
#> INFO  [2026-08-31 18:26:51] ** Rows with values of Reverse equal to + are removed 
#> INFO  [2026-08-31 18:26:51] ** + Contaminant, + Reverse, + Decoy, + Potential.contaminant proteins are removed.
#> INFO  [2026-08-31 18:26:51] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:51] ** Raw data from MaxQuant cleaned successfully.
#> INFO  [2026-08-31 18:26:51] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:51] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:51] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:51] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:51] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:51] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:51] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:51] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:51] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:51] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:51] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:51] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.mq)
#>   ProteinName PeptideSequence Charge              PSM  Mixture TechRepMixture
#> 1      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#> 2      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#> 3      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#> 4      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#> 5      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#> 6      Q9H0L4  AMETEVLETR(ar)      2 AMETEVLETR(ar)_2 Mixture1              1
#>                                        Run  Channel BioReplicate Condition
#> 1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel0         Norm      Norm
#> 2 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel1        0.667     0.667
#> 3 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel2        0.125     0.125
#> 4 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel3          0.5       0.5
#> 5 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel4            1         1
#> 6 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01 channel5        0.125     0.125
#>   Intensity
#> 1    441.04
#> 2    673.25
#> 3    822.33
#> 4    923.38
#> 5    816.31
#> 6    728.89

SpectroMinetoMSstatsTMTFormat()

Preprocess PSM data from SpectroMine and convert into the required input format for MSstatsTMT.

Arguments

  • input : data name of SpectroMine PSM output. Read PSM sheet.
  • annotation : data frame which contains column Run, Fraction, TechRepMixture, Channel, Condition, BioReplicate, Mixture.
  • filter_with_Qvalue : TRUE(default) will filter out the intensities that have greater than qvalue_cutoff in EG.Qvalue column. Those intensities will be replaced with NA and will be considered as censored missing values for imputation purpose.
  • qvalue_cutoff : Cutoff for EG.Qvalue. default is 0.01.
  • useUniquePeptide : TRUE(default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
  • rmPSM_withfewMea_withinRun : only for rmPSM_withMissing_withinRun = FALSE. TRUE(default) will remove the features that have 1 or 2 measurements within each Run.
  • removeProtein_with1Peptide : TRUE will remove the proteins which have only 1 peptide and charge. Default is FALSE.
  • summaryforMultipleRows : sum(default) or max - when there are multiple measurements for certain PSM in certain run, select the PSM with the largest summation or maximal value.

Example

# Read in SpectroMine PSM report
# raw.mine <- read.csv('20180831_095547_CID-OT-MS3-Short_PSM Report_20180831_103118.xls', sep="\t")
raw.mine = data.table::fread(system.file("tinytest/raw_data/SpectroMine/spectromine_input.csv",
                                         package = "MSstatsConvert"))

# Users should make this annotation file. It is not the output from SpectroMine
# annotation.mine <- read.csv(file="Mine_Annotation.csv", header=TRUE)
annotation.mine = data.table::fread(system.file("tinytest/raw_data/SpectroMine/spectromine_annotation.csv",
                                                package = "MSstatsConvert"))

input.mine <- SpectroMinetoMSstatsTMTFormat(raw.mine, annotation.mine)
#> INFO  [2026-08-31 18:26:52] ** Raw data from SpectroMine imported successfully.
#> INFO  [2026-08-31 18:26:52] ** Raw data from SpectroMine cleaned successfully.
#> INFO  [2026-08-31 18:26:52] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:52] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:52] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:52] ** Intensities with values not smaller than 0.01 in PGQValue are replaced with NA
#> INFO  [2026-08-31 18:26:52] ** Intensities with values not smaller than 0.01 in Qvalue are replaced with NA
#> INFO  [2026-08-31 18:26:52] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:52] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:52] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:52] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:52] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:52] ** For peptides overlapped between fractions of 1_1 use the fraction with maximal average abundance.
#> INFO  [2026-08-31 18:26:52] ** Fractions belonging to same mixture have been combined.
#> INFO  [2026-08-31 18:26:52] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:52] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:52] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:52] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.mine)
#>             ProteinName           PeptideSequence Charge
#> 1 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#> 2 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#> 3 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#> 4 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#> 5 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#> 6 CONT_CYC_HUMAN;P99999 [TMTNter]ADLIAYLK[TMTLys]      2
#>                           PSM Mixture TechRepMixture Run  Channel BioReplicate
#> 1 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_126            1
#> 2 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_127            2
#> 3 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_128            3
#> 4 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_129            1
#> 5 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_130            2
#> 6 [TMTNter]ADLIAYLK[TMTLys]_2       1              1 1_1 TMT6_131            3
#>   Condition Intensity
#> 1         3 105151.30
#> 2         3 118259.40
#> 3         3 113459.10
#> 4         1 119072.50
#> 5         1 130280.20
#> 6         1  93297.63

OpenMStoMSstatsTMTFormat()

Preprocess MSstatsTMT report from OpenMS and convert into the required input format for MSstatsTMT.

Arguments

  • input : data name of MSstatsTMT report from OpenMS. Read csv file.
  • useUniquePeptide : TRUE(default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
  • rmPSM_withfewMea_withinRun : only for rmPSM_withMissing_withinRun = FALSE. TRUE(default) will remove the features that have 1 or 2 measurements within each Run.
  • removeProtein_with1Peptide : TRUE will remove the proteins which have only 1 peptide and charge. Default is FALSE.
  • summaryforMultipleRows : sum(default) or max - when there are multiple measurements for certain PSM in certain run, select the PSM with the largest summation or maximal value.

Example

# read in MSstatsTMT report from OpenMS
# raw.om <- read.csv("OpenMS_20200222/20200225_MSstatsTMT_OpenMS_Export.csv")
raw.om = data.table::fread(system.file("tinytest/raw_data/OpenMSTMT/openmstmt_input.csv",
                                       package = "MSstatsConvert"))
head(raw.om)
#>    RetentionTime          ProteinName
#>            <num>               <char>
#> 1:      4359.565 sp|Q60854|SPB6_MOUSE
#> 2:      6190.042 sp|Q60854|SPB6_MOUSE
#> 3:      4359.565 sp|Q60854|SPB6_MOUSE
#> 4:      6190.042 sp|Q60854|SPB6_MOUSE
#> 5:      6190.042 sp|Q60854|SPB6_MOUSE
#> 6:      4359.565 sp|Q60854|SPB6_MOUSE
#>                                  PeptideSequence Charge Channel Condition
#>                                           <char>  <int>   <int>    <char>
#> 1: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       1   Long_HF
#> 2: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       1   Long_HF
#> 3: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       4   Long_HF
#> 4: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       4   Long_HF
#> 5: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       6   Long_HF
#> 6: .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3       6   Long_HF
#>    BioReplicate    Run Mixture TechRepMixture Fraction Intensity
#>           <int> <char>   <int>         <char>    <int>     <num>
#> 1:           21  3_3_3       3            3_3        3     0.000
#> 2:           21  3_3_3       3            3_3        3     0.000
#> 3:           24  3_3_3       3            3_3        3     0.000
#> 4:           24  3_3_3       3            3_3        3     0.000
#> 5:           26  3_3_3       3            3_3        3     0.000
#> 6:           26  3_3_3       3            3_3        3  1820.072
#>                                                                                                            Reference
#>                                                                                                               <char>
#> 1: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=20506
#> 2: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=31588
#> 3: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=20506
#> 4: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=31588
#> 5: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=31588
#> 6: PAMI-194_Mouse_U-Dd_TMT_40ug_22pctACN_25cm_120min_20160426_OT.mzML_controllerType=0 controllerNumber=1 scan=20506

# the function only requries one input file
input.om <- OpenMStoMSstatsTMTFormat(raw.om)
#> INFO  [2026-08-31 18:26:53] ** Raw data from OpenMS imported successfully.
#> INFO  [2026-08-31 18:26:53] ** Raw data from OpenMS cleaned successfully.
#> INFO  [2026-08-31 18:26:53] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:53] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:53] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:53] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:53] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:53] ** For peptides overlapped between fractions of 3_3_3 use the fraction with maximal average abundance.
#> INFO  [2026-08-31 18:26:53] ** For peptides overlapped between fractions of 2_2_2 use the fraction with maximal average abundance.
#> INFO  [2026-08-31 18:26:54] ** Fractions belonging to same mixture have been combined.
#> INFO  [2026-08-31 18:26:54] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:54] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:54] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:54] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.om)
#>            ProteinName                               PeptideSequence Charge
#> 1 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#> 2 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#> 3 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#> 4 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#> 5 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#> 6 sp|Q60854|SPB6_MOUSE .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR      3
#>                                               PSM Mixture TechRepMixture   Run
#> 1 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#> 2 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#> 3 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#> 4 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#> 5 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#> 6 .(TMT6plex)AFVEVNEEGTEAAAATAGMM(Oxidation)TVR_3       3            3_3 3_3_3
#>   Channel BioReplicate Condition Intensity
#> 1       1           21   Long_HF        NA
#> 2       2           22      Norm  1068.580
#> 3       3           23    Long_M  1508.330
#> 4       4           24   Long_HF        NA
#> 5       5           25   Long_LF  1580.951
#> 6       6           26   Long_HF  1820.072

PhilosophertoMSstatsTMTFormat()

Preprocess MSstats report from Philosopher of Fragpipe and convert into the required input format for MSstatsTMT.

Arguments

  • input : list of tables exported by Philosopher. Fragpipe produces a csv file for each TMT mixture.
  • path : a path to the folder with all the Philosopher msstats csv files. Fragpipe produces a msstats.csv file for each TMT mixture.
  • folder : logical, if TRUE, path parameter will be treated as folder path and all msstats*.csv files will be imported. If FALSE, path parameter will be treated as a vector of fixed file paths.
  • annotation : annotation with Run, Fraction, TechRepMixture, Mixture, Channel, BioReplicate, Condition columns or a path to file. Refer to the example ‘annotation’ for the meaning of each column. Channel column should be consistent with the channel columns (Ignore the prefix “Channel”) in msstats.csv file. Run column should be consistent with the Spectrum.File columns in msstats.csv file.
  • protein_id_col : Use ‘Protein.Accessions’(default) column for protein name. ‘Master.Protein.Accessions’ can be used instead to get the protein ID with single protein.
  • peptide_id_col : Use ‘Peptide.Sequence’(default) column for peptide sequence. ‘Modified.Peptide.Sequence’ can be used instead to get the modified peptide sequence.
  • Purity_cutoff : Cutoff for purity. Default is 0.6
  • PeptideProphet_prob_cutoff : Cutoff for the peptide identification probability. Default is 0.7.
  • useUniquePeptide : logical, if TRUE (default) removes peptides that are assigned for more than one proteins. We assume to use unique peptide for each protein.
  • rmPSM_withfewMea_withinRun : TRUE(default) will remove the features that have 1 or 2 measurements within each Run.
  • rmPeptide_OxidationM : TRUE (default) will remove the peptides including oxidation (M) sequence.
  • removeProtein_with1Peptide : TRUE will remove the proteins which have only 1 peptide and charge. Default is FALSE.
  • summaryforMultipleRows : sum(default) or max - when there are multiple measurements for certain PSM in certain run, select the PSM with the largest summation or maximal value.

Example

input_file_path = system.file("tinytest/raw_data/Philosopher/msstats.csv",
                               package = "MSstatsConvert")
annotation_file_path = system.file("tinytest/raw_data/Philosopher/MSstatsTMT_annotation.csv",
                                   package = "MSstatsConvert")
input = data.table::fread(input_file_path)
annotation = data.table::fread(annotation_file_path)

input.philosopher <- PhilosophertoMSstatsTMTFormat(input, annotation)
#> INFO  [2026-08-31 18:26:55] ** Raw data from Philosopher imported successfully.
#> INFO  [2026-08-31 18:26:55] ** Using provided annotation.
#> INFO  [2026-08-31 18:26:55] ** Run and Channel labels were standardized to remove symbols such as '.' or '%'.
#> INFO  [2026-08-31 18:26:55] ** The following options are used:
#>   - Features will be defined by the columns: PeptideSequence, PrecursorCharge
#>   - Shared peptides will be removed.
#>   - Proteins with single feature will not be removed.
#>   - Features with less than 3 measurements within each run will be removed.
#> INFO  [2026-08-31 18:26:55] ** Rows with values not greater than 0.6 in Purity are removed 
#> WARN  [2026-08-31 18:26:55] ** PeptideProphetProbability not found in input columns.
#> INFO  [2026-08-31 18:26:55] ** Sequences containing Oxidation are removed.
#> INFO  [2026-08-31 18:26:55] ** Features with all missing measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:55] ** Shared peptides are removed.
#> INFO  [2026-08-31 18:26:55] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:55] ** PSMs have been aggregated to peptide ions.
#> INFO  [2026-08-31 18:26:55] ** Run annotation merged with quantification data.
#> INFO  [2026-08-31 18:26:55] ** Features with one or two measurements across channels within each run are removed.
#> INFO  [2026-08-31 18:26:55] ** Fractionation handled.
#> INFO  [2026-08-31 18:26:55] ** Updated quantification data to make balanced design. Missing values are marked by NA
#> INFO  [2026-08-31 18:26:55] ** Finished preprocessing. The dataset is ready to be processed by the proteinSummarization function.
head(input.philosopher)
#>             ProteinName PeptideSequence Charge               PSM Mixture
#> 1 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#> 2 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#> 3 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#> 4 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#> 5 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#> 6 sp|P58107|EPIPL_HUMAN AEAEAEAGSPRPDPR      3 AEAEAEAGSPRPDPR_3  plex16
#>   TechRepMixture                                    Run Channel    BioReplicate
#> 1              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01     126 CPT0088900003_T
#> 2              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01    127C CPT0088920001_N
#> 3              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01    127N CPT0079270003_T
#> 4              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01    128C CPT0088550004_T
#> 5              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01    128N CPT0079300001_N
#> 6              1 16CPTAC_CCRCC_W_JHU_20180322_LUMOS_f01    129C CPT0014450004_T
#>   Condition Intensity
#> 1         T 324756.47
#> 2         N 127025.63
#> 3         T  18408.94
#> 4         T  30560.06
#> 5         N  16732.82
#> 6         T 234934.59

2. Protein summarization, normalization and visualization

2.1. proteinSummarization()

After reading the input files and get the data with required format, MSstatsTMT performs

Global median normalization is first applied to peptide level quantification data (equalizing the medians across all the channels and MS runs). Protein summarization from peptide level quantification should be performed before testing differentially abundant proteins. Then, normalization between MS runs using reference channels will be implemented. In particular, protein summarization method MSstats assumes missing values are censored and then imputes the missing values before summarizing peptide level data into protein level data. Other methods, including MedianPolish, Median and LogSum, do not impute missing values.

Arguments

  • data : Name of the output of PDtoMSstatsTMTFormat function or peptide-level quantified data from other tools. It should have columns named Protein, PSM, TechRepMixture, Mixture, Run, Channel, Condition, BioReplicate, Intensity.
  • method : Four different summarization methods to protein-level can be performed : msstats(default), MedianPolish, Median, LogSum.
  • global_norm : Global median normalization on peptide level data (equalizing the medians across all the channels and MS runs). Default is TRUE. It will be performed before protein-level summarization.
  • reference_norm : Reference channel based normalization between MS runs. TRUE(default) needs at least one reference channel in each MS run, annotated by Norm in Condtion column. It will be performed after protein-level summarization. FALSE will not perform this normalization step. If data only has one run, then reference_norm=FALSE.
  • remove_norm_channel : TRUE(default) removes Norm channels from protein level data.
  • remove_empty_channel : TRUE(default) removes Empty channels from protein level data.
  • MBimpute : only for method = "msstats". TRUE (default) imputes missing values by Accelated failure model. FALSE uses minimum value to impute the missing value for each peptide precursor ion.
  • maxQuantileforCensored : We assume missing values are censored. maxQuantileforCensored is Maximum quantile for deciding censored missing value, for instance, 0.999. Default is Null.

Example

# use MSstats for protein summarization
quant.msstats <- proteinSummarization(input.pd,
                                      method="msstats",
                                      global_norm=TRUE,
                                      reference_norm=TRUE,
                                      remove_norm_channel = TRUE,
                                      remove_empty_channel = TRUE)
head(quant.msstats$ProteinLevelData)
#>    Mixture TechRepMixture                                         Run Channel
#> 1 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 2 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 3 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 4 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 5 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 6 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#>   Protein Abundance BioReplicate Condition
#> 1  O75947  16.77013        0.125     0.125
#> 2  P38159  15.50403        0.125     0.125
#> 3  Q15435  13.81007        0.125     0.125
#> 4  O75947  16.26600        0.667     0.667
#> 5  P38159  15.08331        0.667     0.667
#> 6  Q15435  13.63222        0.667     0.667
# use Median for protein summarization
quant.median <- proteinSummarization(input.pd,
                                     method="Median",
                                     global_norm=TRUE,
                                     reference_norm=TRUE,
                                     remove_norm_channel = TRUE,
                                     remove_empty_channel = TRUE)
head(quant.median$ProteinLevelData)
#>    Mixture TechRepMixture                                         Run Channel
#> 1 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 2 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 3 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127C
#> 4 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 5 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#> 6 Mixture1              1 161117_SILAC_HeLa_UPS1_TMT10_Mixture1_01raw    127N
#>   Protein Abundance BioReplicate Condition
#> 1  O75947  16.66857        0.125     0.125
#> 2  P38159  15.30432        0.125     0.125
#> 3  Q15435  13.81007        0.125     0.125
#> 4  O75947  16.13087        0.667     0.667
#> 5  P38159  14.98373        0.667     0.667
#> 6  Q15435  13.63222        0.667     0.667

2.2 dataProcessPlotsTMT()

Visualization for explanatory data analysis. To illustrate the quantitative data after data-preprocessing and quality control of TMT runs, dataProcessPlotsTMT takes the quantitative data and summarized data from function proteinSummarization as input. It generates two types of figures in pdf files as output :

  1. profile plot (specify “ProfilePlot” in option type), to identify the potential sources of variation for each protein;

  2. quality control plot (specify “QCPlot” in option type), to evaluate the systematic bias between MS runs and channels.

Arguments

  • data : the output of proteinSummarization function. It is a list with data frames FeatureLevelData and ProteinLevelData
  • type : choice of visualization. “ProfilePlot” represents profile plot of log intensities across MS runs. “QCPlot” represents quality control plot of log intensities across MS runs.
  • ylimUp : upper limit for y-axis in the log scale. FALSE(Default) for Profile Plot and QC Plot use the upper limit as rounded off maximum of log2(intensities) after normalization + 3.
  • ylimDown : lower limit for y-axis in the log scale. FALSE(Default) for Profile Plot and QC Plot is 0.
  • x.axis.size : size of x-axis labeling for “Run” and “channel” in Profile Plot and QC Plot.
  • y.axis.size : size of y-axis labels. Default is 10.
  • text.size : size of labels represented each condition at the top of graph in Profile Plot and QC plot. Default is 4.
  • text.angle : angle of labels represented each condition at the top of graph in Profile Plot and QC plot. Default is 0.
  • legend.size : size of legend above graph in Profile Plot. Default is 7.
  • dot.size.profile : size of dots in profile plot. Default is 2.
  • ncol.guide : number of columns for legends at the top of plot. Default is 5.
  • width : width of the saved file. Default is 10.
  • height : height of the saved file. Default is 10.
  • which.Protein : Protein list to draw plots. List can be names of Proteins or order numbers of Proteins. Default is “all”, which generates all plots for each protein. For QC plot, “allonly” will generate one QC plot with all proteins.
  • originalPlot : TRUE(default) draws original profile plots, without normalization.
  • summaryPlot : TRUE(default) draws profile plots with protein summarization for each channel and MS run.
  • address : the name of folder that will store the results. Default folder is the current working directory. The other assigned folder has to be existed under the current working directory. An output pdf file is automatically created with the default name of “ProfilePlot.pdf” or “QCplot.pdf”. The command address can help to specify where to store the file as well as how to modify the beginning of the file name. If address=FALSE, plot will be not saved as pdf file but showed in window.

Example

## Profile plot without norm channnels and empty channels
dataProcessPlotsTMT(data=quant.msstats,
                     type = 'ProfilePlot',
                     width = 21, # adjust the figure width since there are 15 TMT runs.
                     height = 7)

There are two pdfs with all the proteins, first is profile plot and second plot is profile plot with summarized and normalized data. XXX_ProfilePlot.pdf shows each peptide ions across runs and channels, grouped per condition. Each panel represents one MS run and each dot within one panel is one channel within one Run. Each peptide has a different colour/type layout. The dots are linked with line per peptide ion If line is disconnected, that means there is no value (missing value). Profile plot is good visualization to check individual measurements. XXX_ProfilePlot_wSummarization.pdf shows the same peptide ions in grey, with the values as summarized by the model overlayed in red.

Instead of making all profile plots for all proteins, we can make plot for individual protein. Here is the example of proteinO75947

dataProcessPlotsTMT(data=quant.msstats,
                    type='ProfilePlot', # choice of visualization
                    width = 21,
                    height = 7,
                    which.Protein = 'O75947') 
## Quality control plot 
# dataProcessPlotsTMT(data=quant.msstats, 
                     # type='QCPlot',
                     # width = 21, # adjust the figure width since there are 15 TMT runs. 
                     # height = 7)

3. groupComparisonTMT()

Tests for significant changes in protein abundance across conditions based on a family of linear mixed-effects models in TMT experiment. Experimental design of case-control study (patients are not repeatedly measured) is automatically determined based on proper statistical model.

Arguments

If you want to make all the pairwise comparison,MSstatsTMT has an easy option for it. Setting contrast.matrix = pairwise compares all the possible pairs between two conditions.

Example

# test for all the possible pairs of conditions
test.pairwise <- groupComparisonTMT(quant.msstats, moderated = TRUE)
# Show test result
# Label : which comparison is used
# log2FC : estimated log2 fold change between two conditions (the contrast)
# adj.pvalue : adjusted p value
head(test.pairwise$ComparisonResult)
#>    Protein          Label       log2FC        SE       DF    pvalue adj.pvalue
#>     <fctr>         <char>        <num>     <num>    <num>     <num>      <num>
#> 1:  O75947 0.125 vs 0.667 -0.024798468 0.0313803 107.2564 0.4311222  0.6493356
#> 2:  O75947     0.125 vs 1  0.003502748 0.0313803 107.2564 0.9113314  0.9976169
#> 3:  O75947   0.125 vs 0.5 -0.042796937 0.0313803 107.2564 0.1754811  0.4795610
#> 4:  O75947     0.667 vs 1  0.028301215 0.0313803 107.2564 0.3691423  0.7382847
#> 5:  O75947   0.667 vs 0.5 -0.017998469 0.0313803 107.2564 0.5674667  0.5674667
#> 6:  O75947       1 vs 0.5 -0.046299684 0.0313803 107.2564 0.1430245  0.2860490
#>     issue
#>    <lgcl>
#> 1:     NA
#> 2:     NA
#> 3:     NA
#> 4:     NA
#> 5:     NA
#> 6:     NA

If you would like to compare some specific combination of conditions, you need to tell groupComparisonTMT the contrast of the conditions to compare. You can make your contrast.matrix in R in a text editor. We define our contrast matrix by adding a column for every condition. We add a row for every comparison we would like to make between groups of conditions.

0 is for conditions we would like to ignore. 1 is for conditions we would like to put in the numerator of the ratio or fold-change. -1 is for conditions we would like to put in the denumerator of the ratio or fold-change.

If you have multiple groups, you can assign any group comparisons you are interested in.

# Check the conditions in the protein level data
levels(quant.msstats$ProteinLevelData$Condition)
#> [1] "0.125" "0.5"   "0.667" "1"
# Only compare condition 0.125 and 1
comparison<-matrix(c(-1,0,0,1),nrow=1)
# Set the names of each row
row.names(comparison)<-"1-0.125"
# Set the column names
colnames(comparison)<- c("0.125", "0.5", "0.667", "1")
comparison
#>         0.125 0.5 0.667 1
#> 1-0.125    -1   0     0 1
test.contrast <- groupComparisonTMT(data = quant.msstats, contrast.matrix = comparison, moderated = TRUE)
head(test.contrast$ComparisonResult)
#>    Protein   Label        log2FC         SE        DF    pvalue adj.pvalue
#>     <fctr>  <char>         <num>      <num>     <num>     <num>      <num>
#> 1:  O75947 1-0.125 -0.0035027476 0.03138030 107.25635 0.9113314  0.9976169
#> 2:  P38159 1-0.125 -0.0379625797 0.03353778 107.25637 0.2601862  0.8880547
#> 3:  Q15125 1-0.125  0.0003698157 0.12249181  23.25636 0.9976169  0.9976169
#> 4:  Q15435 1-0.125 -0.0458530753 0.05966971 100.25637 0.4440274  0.8880547
#>     issue
#>    <lgcl>
#> 1:     NA
#> 2:     NA
#> 3:     NA
#> 4:     NA