MSstatsResponse: A workflow for analyzing protein turnover mass spectrometry-based proteomics experiments

Introduction

This vignette walks through a protein turnover analysis with the R package MSstatsResponse.

The experiment

The simulated dataset mimics the following design:

  • Labeling: animals are given heavy leucine (Leu6) at time 0
  • Timepoints: 1, 2, 6, 12, 24, 48, 100 and 170 hours after labeling started
  • Acquisition: one run per timepoint
  • Size: 200 proteins

Every peptide that contains leucine can show up in two forms in this experiment: a light form, made before the heavy leucine was introduced, and a heavy form, made afterward.

How the curve is fit

MSstatsResponse fits a curve to each protein’s heavy fraction over time using isotonic regression. The only thing this method assumes is that the heavy fraction goes up over time (or stays flat).

What the workflow does, step by step

  1. Check data quality (calculateQCScore()): for each protein, what fraction of the expected “light” (pre-existing) peptide measurements did we actually detect? This flags proteins with missing data in the light channel.
  2. Calculate turnover ratios (calculateTurnoverRatios()): for every peptide at every timepoint, what fraction of the signal is heavy (newly made)?
  3. Score peptide quality (calculatePeptideWeights()): give each peptide measurement a quality score, so noisier ones count for less when the curve is fit.
  4. Fit the curve (doseResponseFit()): fit one turnover curve per protein, using the peptide quality scores from step 3.
  5. Score confidence (calculateConfidence()): combine everything above into one number per protein.
  6. Classify proteins (classifyTurnoverProteins()): sort proteins into long-lived, medium-lived, or fast, and label how confident each call is.
  7. Plot the results (visualizeResponseProtein()): look at individual protein turnover curves.

Installation and setup

Install MSstatsResponse

if (!requireNamespace("BiocManager", quietly = TRUE))
  install.packages("BiocManager")

BiocManager::install("MSstatsResponse")

# MSstats is only needed if you run the preprocessing in the next section
BiocManager::install("MSstats")

Load required libraries

library(MSstatsResponse)
library(dplyr)
library(ggplot2)
library(data.table)

Data preprocessing with MSstats

Before MSstatsResponse can be used, the raw output from the search software has to be cleaned up, normalized, and summarized with the standard MSstats workflow. That means converting it into MSstats format with one of the converter functions (for labeled turnover data, e.g. SpectronauttoMSstatsFormat() or DIANNtoMSstatsFormat()) and then running dataProcess().

The code below is shown for reference only and does not run when this vignette is built. The rest of the vignette starts from the simulated example dataset in the next section, which has the same structure as the FeatureLevelData returned by dataProcess().

library(MSstats)
library(stringr)

input = data.table::fread("path/to/spectronaut_report.csv")

# Build the annotation from the report itself: one row per run (fraction)
annotation = input %>%
  distinct(Run = R.FileName, Fraction = R.Fraction, Condition = R.Condition) %>%
  mutate(BioReplicate = Condition)

# Keep peptides with 0 or 1 leucine in the sequence:
#   0 L -> can never pick up the heavy label. MSstats marks these LABEL = NA,
#          and they're exactly the peptides `nameStandards = "unlabeled"` uses
#          as normalization standards below, so they need to be kept here.
#   1 L -> one leucine, so the heavy version is fully labeled and the light
#          version has none. A clean heavy/light pair.
#  >=2 L -> dropped. A peptide with 2+ leucines that shows only 1 [Leu6] is
#          partially labeled, not fully labeled, so counting it as "heavy"
#          would understate how much protein actually turned over.
input_proper = input %>%
  filter(str_count(str_remove_all(FG.LabeledSequence, "\\[.*?\\]"), "L") <= 1)

msstats_input = SpectronauttoMSstatsFormat(
  input_proper,
  annotation             = annotation,
  intensity              = "FG.MS1Quantity",
  peptideSequenceColumn  = "FG.LabeledSequence",
  heavyLabels            = c("L[Leu6]"),
  filter_with_Qvalue     = TRUE,
  removeFewMeasurements  = FALSE,
  calculateAnomalyScores = FALSE
)

quant_data = dataProcess(msstats_input,
                         normalization = "globalStandards",
                         nameStandards = "unlabeled",
                         featureSubset = "all",
                         numberOfCores = 4)

feature_data = quant_data$FeatureLevelData

Loading the example data

data("simulated_turnover_data", package = "MSstatsResponse")

# To analyze your own data, use the output of dataProcess() instead:
# df_feat = quant_data$FeatureLevelData
df_feat = simulated_turnover_data

The turnover functions below skip rows without a heavy or light label, a measured intensity, or a timepoint on their own. That includes the leucine-free normalization peptides (LABEL = NA), which are only used by dataProcess().

df_feat %>%
  summarize(proteins   = n_distinct(PROTEIN),
            peptides   = n_distinct(PEPTIDE),
            timepoints = n_distinct(GROUP),
            runs       = n_distinct(originalRUN))
#>   proteins peptides timepoints runs
#> 1      200     1043          8    8

table(df_feat$GROUP, df_feat$LABEL, useNA = "ifany")
#>         
#>            H   L <NA>
#>   1hr    191 743  187
#>   2hrs   192 751  191
#>   6hrs   239 742  184
#>   12hrs  286 748  185
#>   24hrs  328 743  187
#>   48hrs  364 741  185
#>   100hrs 371 743  191
#>   170hrs 401 756  187

Heavy measurements become more common at later timepoints, as more of each protein is replaced.

Full workflow

Step 1: Checking data quality (light-channel QC)

For every protein, we ask: of all the pre-existing (light) peptide measurements we could have possibly seen (every peptide, at every timepoint), how many did we actually detect?

\[\text{QC score} = \frac{\text{light measurements observed}}{\text{light peptides} \times \text{timepoints}}\]

A protein seen at every peptide and every timepoint scores 1.0. A protein that’s only there for half of those combinations scores 0.5.

This matters most for proteins with little or no heavy signal later on: is that because the protein genuinely turns over slowly, or just because we didn’t measure it very well? The QC score helps tell those two situations apart.

qc = calculateQCScore(df_feat)
qc %>% head(n = 10)
#> # A tibble: 10 × 5
#>    PROTEIN     n_light_peptides observed_cells n_max_possible qc_score
#>    <fct>                  <int>          <int>          <int>    <dbl>
#>  1 Protein_001                2             16             16    1    
#>  2 Protein_002               11             77             88    0.875
#>  3 Protein_003                4             30             32    0.938
#>  4 Protein_004                8             63             64    0.984
#>  5 Protein_005                6             47             48    0.979
#>  6 Protein_006                3             23             24    0.958
#>  7 Protein_007                2             12             16    0.75 
#>  8 Protein_008                1              8              8    1    
#>  9 Protein_009                3             23             24    0.958
#> 10 Protein_010               10             61             80    0.762

Step 2: Turnover ratios

For every peptide at every timepoint, we calculate what fraction of its signal is heavy:

\[\text{heavy fraction} = \frac{\text{heavy intensity}}{\text{heavy intensity} + \text{light intensity}}\]

The heavy leucine given to the animals is never 100% pure once it’s inside the body, so a fully-replaced protein won’t actually reach a heavy fraction of 1. It’ll top out wherever the tracer purity is. To correct for this, we divide the raw ratio above by the known tracer purity (“tracer constant”) at each timepoint. After this correction, a heavy fraction of 1 really does mean “fully replaced.” This corrected number is stored as H_frac, and it’s what gets modeled in the rest of the workflow. Tracer constants vary from experiment to experiment; the values below are the ones used to simulate the example data. By default (normalize_tracer = FALSE) no correction is applied, which is the same as using a tracer constant of 1.

tracer_constants = c(
  `1`  = 0.11, `2`  = 0.10, `6`   = 0.11, `12`  = 0.12,
  `24` = 0.12, `48` = 0.13, `100` = 0.15, `170` = 0.17
)

ratios = calculateTurnoverRatios(df_feat, normalize_tracer = TRUE,
                                 tracer_constants = tracer_constants)

doseResponseFit() expects columns named protein, drug, dose, and response, so we add them here. The timepoint plays the role of the dose, and the tracer-corrected heavy fraction is the response.

ratios = ratios %>%
  mutate(protein = Protein, drug = "Synthesis", dose = TimeVal,
         response = H_frac)

table(ratios$TimeVal)
#> 
#>   1   2   6  12  24  48 100 170 
#> 191 192 239 286 328 364 371 401
ratios %>% head(10)
#> Key: <Protein, BaseSequence, TimeVal, Run>
#>         Protein          BaseSequence TimeVal    Run     Heavy     Light
#>          <fctr>                <char>   <num> <fctr>     <num>     <num>
#>  1: Protein_001    FCLESDHHITSNHEEK_3     100      7  7337.723 123071.23
#>  2: Protein_001    FCLESDHHITSNHEEK_3     170      8  6580.717  76785.85
#>  3: Protein_001     NPAEMFDISMTTSLK_2       2      2  3793.814  83930.40
#>  4: Protein_001     NPAEMFDISMTTSLK_2      12      4  5446.868 175617.95
#>  5: Protein_001     NPAEMFDISMTTSLK_2      48      6  3777.080  93931.63
#>  6: Protein_001     NPAEMFDISMTTSLK_2     100      7  9666.228 101642.60
#>  7: Protein_001     NPAEMFDISMTTSLK_2     170      8  7429.297 118928.54
#>  8: Protein_002 CQDELMFMVQGTNPSMEHR_2       2      2  2461.651 160827.58
#>  9: Protein_002 CQDELMFMVQGTNPSMEHR_2       6      3 20712.488 249462.17
#> 10: Protein_002 CQDELMFMVQGTNPSMEHR_2      12      4  9420.168 130922.93
#>         Total    H_frac    L_frac tracer_factor     protein      drug  dose
#>         <num>     <num>     <num>         <num>      <fctr>    <char> <num>
#>  1: 130408.95 0.3751135 0.6248865          0.15 Protein_001 Synthesis   100
#>  2:  83366.57 0.4643360 0.5356640          0.17 Protein_001 Synthesis   170
#>  3:  87724.21 0.4324706 0.5675294          0.10 Protein_001 Synthesis     2
#>  4: 181064.82 0.2506869 0.7493131          0.12 Protein_001 Synthesis    12
#>  5:  97708.71 0.2973579 0.7026421          0.13 Protein_001 Synthesis    48
#>  6: 111308.83 0.5789434 0.4210566          0.15 Protein_001 Synthesis   100
#>  7: 126357.83 0.3458570 0.6541430          0.17 Protein_001 Synthesis   170
#>  8: 163289.23 0.1507540 0.8492460          0.10 Protein_002 Synthesis     2
#>  9: 270174.66 0.6969393 0.3030607          0.11 Protein_002 Synthesis     6
#> 10: 140343.10 0.5593535 0.4406465          0.12 Protein_002 Synthesis    12
#>      response
#>         <num>
#>  1: 0.3751135
#>  2: 0.4643360
#>  3: 0.4324706
#>  4: 0.2506869
#>  5: 0.2973579
#>  6: 0.5789434
#>  7: 0.3458570
#>  8: 0.1507540
#>  9: 0.6969393
#> 10: 0.5593535

Modeling degradation instead of synthesis? Use the same steps, but set drug = "Degradation", response = L_frac, and increasing = FALSE in the fitting step below, and adjust tracer_constants accordingly.

Step 3: Scoring peptide quality

Peptides differ a lot in how much we should trust them: some are detected at every timepoint, some rise cleanly over time the way we’d expect turnover to behave, and some are noisy. Rather than treating every peptide equally, this step gives each one a quality weight between 0 and 1, so unreliable peptides count for less when we fit each protein’s curve in Step 4.

The weight is four scores multiplied together, each answering a different question about the peptide:

\[w = w_{\text{cov}} \times w_{\text{mono}} \times w_{\text{light}} \times w_{\text{valid}}\]

  • Coverage \(\;w_{\text{cov}} = \min(1,\, k_{tp} / n\bar{p})\): was this peptide detected often enough, compared to the protein’s other peptides? \(k_{tp}\) is the number of (non-zero) timepoints where this peptide was detected; \(n\bar{p}\) is the average detection count across the protein’s peptides. A peptide detected at or above the protein’s average scores 1; one seen at far fewer timepoints drops toward 0.
  • Monotonicity \(\;w_{\text{mono}} = \max(0,\, \tau)\): does its synthesis ratio \(y_H\) (the heavy fraction) actually go up over time, the way turnover should behave? \(\tau\) is Kendall’s rank correlation between timepoint and \(y_H\), floored at 0. A peptide that rises cleanly scores close to 1; one that goes up and down scores lower; one that only goes down, or has fewer than two detected timepoints, scores exactly 0.
  • Light intensity (optional) \(\;w_{\text{light}} = 1\) by default: an optional “top-\(N\)” filter rather than a quality signal. When turned on, it keeps the \(N\) most intense peptides per protein (ranked by median light-channel intensity), scoring them 1 and the rest 0.
  • Validity \(\;w_{\text{valid}} = \mathbf{1}(0 \le y_H \le \theta)\): is the value itself logical? Unlike the other three, this is checked per measurement (default cutoff \(\theta = 1.3\)): a synthesis ratio that’s negative, missing, or above \(\theta\) scores 0 for that one timepoint, leaving the peptide’s other measurements untouched.
ratios_weighted = calculatePeptideWeights(
  ratios,
  validity_threshold = 1.3, # adjustable to any value
  top_n_peptides     = NULL # NULL uses all peptides; a number keeps only the
                            # top n peptides by light-channel intensity
)
ratios_weighted %>% data.frame() %>% head(10)
#>        Protein          BaseSequence TimeVal Run      Heavy      Light
#> 1  Protein_002 DWLGMAICNNIIMATFAYR_2       1   1   597.6302   55972.99
#> 2  Protein_002 ETCMIVEAPFDLVHAWEYR_2       1   1  7789.0600  104422.39
#> 3  Protein_002           LPYNCCQHK_3       1   1  8474.7089  169163.81
#> 4  Protein_002     LQEYQEDMIAWPPDR_3       1   1 34199.1360  315011.48
#> 5  Protein_002   LSGCGHQSTIPNPQIER_3       1   1  5239.7973  193269.36
#> 6  Protein_002          MGDHTILMGR_3       1   1  5808.7824   74664.17
#> 7  Protein_002        MHLMMDMQAINK_2       1   1  3907.4447   52948.62
#> 8  Protein_002         MIVLMDVEQGR_2       1   1  8174.4972  144662.47
#> 9  Protein_004 DDYQVCWHTLCVIPFHAVK_2       1   1 71768.3097 1297687.83
#> 10 Protein_004          DHEMLDYHHR_3       1   1  3854.6940  380086.60
#>         Total     H_frac    L_frac tracer_factor     protein      drug dose
#> 1    56570.62 0.09603929 0.9039607          0.11 Protein_002 Synthesis    1
#> 2   112211.45 0.63103755 0.3689624          0.11 Protein_002 Synthesis    1
#> 3   177638.52 0.43370552 0.5662945          0.11 Protein_002 Synthesis    1
#> 4   349210.62 0.89029720 0.1097028          0.11 Protein_002 Synthesis    1
#> 5   198509.16 0.23996133 0.7600387          0.11 Protein_002 Synthesis    1
#> 6    80472.95 0.65620948 0.3437905          0.11 Protein_002 Synthesis    1
#> 7    56856.06 0.62477460 0.3752254          0.11 Protein_002 Synthesis    1
#> 8   152836.97 0.48622798 0.5137720          0.11 Protein_002 Synthesis    1
#> 9  1369456.14 0.47642211 0.5235779          0.11 Protein_004 Synthesis    1
#> 10  383941.29 0.09127091 0.9087291          0.11 Protein_004 Synthesis    1
#>      response n_obs k_obs coverage_per_peptide peptide_median_light p_protein
#> 1  0.09603929     3     3                0.375             46701.88 0.7159091
#> 2  0.63103755     8     8                1.000            105257.40 0.7159091
#> 3  0.43370552     7     7                0.875            169163.81 0.7159091
#> 4  0.89029720     7     7                0.875            324393.73 0.7159091
#> 5  0.23996133     6     6                0.750            170750.41 0.7159091
#> 6  0.65620948     6     6                0.750             68927.75 0.7159091
#> 7  0.62477460     6     6                0.750             36340.23 0.7159091
#> 8  0.48622798     7     7                0.875            120891.68 0.7159091
#> 9  0.47642211     8     8                1.000           1205930.05 0.9062500
#> 10 0.09127091     8     8                1.000            469587.91 0.9062500
#>    coverage_score peptide_rank light_intensity_score monotonicity_score
#> 1       0.5238095            9                     1          1.0000000
#> 2       1.0000000            7                     1          0.2857143
#> 3       1.0000000            3                     1          0.4285714
#> 4       1.0000000            1                     1          0.0000000
#> 5       1.0000000            2                     1          0.4666667
#> 6       1.0000000            8                     1          0.0000000
#> 7       1.0000000           11                     1          0.3333333
#> 8       1.0000000            5                     1          0.3333333
#> 9       1.0000000            1                     1          0.4285714
#> 10      1.0000000            5                     1          0.6428571
#>    validity_flag    weight
#> 1              1 0.5238095
#> 2              1 0.2857143
#> 3              1 0.4285714
#> 4              1 0.0000000
#> 5              1 0.4666667
#> 6              1 0.0000000
#> 7              1 0.3333333
#> 8              1 0.3333333
#> 9              1 0.4285714
#> 10             1 0.6428571

Step 4: Fitting the turnover curve

This fits one curve per protein, pooling together all of its peptides, weighted by the quality scores from Step 3.

fit = doseResponseFit(ratios_weighted,
                      weights              = ratios_weighted$weight,
                      increasing           = TRUE,
                      transform_dose       = FALSE,
                      precalculated_ratios = TRUE)

Two columns from this step matter later on: SSE_Full (how far the peptide measurements sit from the fitted curve; lower means a better fit) and max_fitted_ratio (how high the curve climbs; used in Step 6 to decide whether a protein is fast, medium, or long-lived).

fit %>%
  select(Protein, SSE_Full, max_fitted_ratio) %>%
  head(10)
#>        Protein     SSE_Full max_fitted_ratio
#> 1  Protein_002 18.753880894        1.1043591
#> 2  Protein_004  8.480523988        1.0385873
#> 3  Protein_005  0.407762839        0.1130841
#> 4  Protein_007  0.083023299        1.0555945
#> 5  Protein_008  0.043099606        0.6953337
#> 6  Protein_009  1.663706086        1.0870637
#> 7  Protein_011  0.000000000        0.8213865
#> 8  Protein_012  5.541785350        1.1475077
#> 9  Protein_013  0.002743093        0.4625690
#> 10 Protein_017  0.311871840        0.6834808

Measurements with a weight of 0 don’t affect the curve. A protein needs at least 2 timepoints with a weight above 0 to be fit. Proteins that don’t show up in fit aren’t dropped; they get labeled insufficient_data or no_heavy in Step 6.

Step 5: Scoring confidence

This step combines everything so far into one number per protein, between 0 and 1: how trustworthy its peptides were (Step 3), how well the curve actually fit the data (Step 4), how completely its light channel was measured (Step 1), and how many heavy peptides it had (a protein with just one heavy peptide is discounted, since one peptide’s behavior could be a fluke).

\[\text{confidence} = \bar{w} \times \frac{1}{1 + SSE_{\text{full}}} \times \text{QC} \times \frac{n_H}{n_H + k}\]

  • \(\bar{w}\): the peptide quality weights from Step 3, averaged across the protein
  • \(SSE_{\text{full}}\): how well the curve fit, from Step 4
  • \(\text{QC}\): the light-channel quality score from Step 1
  • \(n_H\): number of peptides with detectable heavy signal
  • \(k\) (k_shrinkage): how harshly to discount proteins with few heavy peptides. With the default \(k = 2\), a protein with only 1 heavy peptide is capped at 1/3 of the score it could otherwise reach.
conf = calculateConfidence(ratios_weighted, fit, qc, df_feat, k_shrinkage = 2)
conf %>%
  arrange(-confidence) %>%
  select(Protein, SSE_Full, max_fitted_ratio, mean_weight, qc_score,
         n_heavy_peptides, confidence) %>%
  head(10)
#>        Protein    SSE_Full max_fitted_ratio mean_weight  qc_score
#> 1  Protein_109 0.011439818        0.2662723   0.7796143 0.9375000
#> 2  Protein_054 0.059188925        0.1700304   0.6211052 1.0000000
#> 3  Protein_107 0.004336873        0.3409730   0.9387755 0.8750000
#> 4  Protein_160 0.023413596        0.4278892   0.7900000 0.8750000
#> 5  Protein_094 0.048921036        0.6098903   0.9008264 0.9375000
#> 6  Protein_064 0.459196213        0.6145862   0.7781189 0.9583333
#> 7  Protein_072 0.209847484        0.7803886   0.7626962 1.0000000
#> 8  Protein_128 0.288981868        1.0740890   0.8611111 1.0000000
#> 9  Protein_092 0.000000000        0.9999945   1.0000000 1.0000000
#> 10 Protein_016 0.000000000        0.6235044   1.0000000 1.0000000
#>    n_heavy_peptides confidence
#> 1                 4  0.4817478
#> 2                 5  0.4188550
#> 3                 2  0.4089408
#> 4                 3  0.4052614
#> 5                 2  0.4025683
#> 6                 6  0.3832747
#> 7                 3  0.3782441
#> 8                 2  0.3340276
#> 9                 1  0.3333333
#> 10                1  0.3333333

Step 6: Classifying proteins

Each protein gets a category describing how it behaves, and a tier (HIGH / MEDIUM / LOW) saying how much to trust that call.

Category is decided by how high the fitted curve climbs (max_fitted_ratio), not by any single peptide’s best measurement:

  • long_lived: the curve never climbs above 30% heavy
  • medium_lived: the curve climbs to somewhere between 30% and 90% heavy
  • fast: the curve climbs above 90% heavy
  • insufficient_data: heavy signal was measured, but fewer than 2 timepoints had a measurement with a weight above 0, so no curve could be fit
  • no_heavy: no heavy signal was ever detected (these are good long-lived-protein candidates too)

Half-life is the time it took the fitted curve to reach 50% heavy. If the curve never gets there, half_life is NA. This includes every long_lived protein, plus any medium_lived protein that plateaus somewhere between 30% and 50%.

Columns worth knowing:

  • half_life: time to reach 50% heavy, or NA if the curve never gets there
  • max_observed_heavy_ratio: the single highest heavy fraction actually measured for this protein, straight from the data (not the fitted curve)
  • max_fitted_ratio: the highest point the fitted curve reaches; this is what decides category
  • confidence: the score from Step 5
  • category, tier: as described above

Tier is just where a protein ranks against the rest of this dataset:

  • proteins with a fitted curve are ranked by confidence
  • no_heavy proteins are ranked by qc_score instead, since there’s no curve to score
  • insufficient_data proteins get no tier (NA)
  • HIGH also requires at least 3 data points, so a great score built on very little data doesn’t count as HIGH

By default, the top 15% are HIGH and the bottom 25% are LOW (everything else is MEDIUM). You can make these stricter or looser, e.g. high_quantile = 0.75 for a top-quartile HIGH cutoff.

final = classifyTurnoverProteins(
  ratios_weighted,
  fit,
  qc,
  conf,
  high_quantile     = 0.85, # upper percentile cutoff for HIGH tier
  low_quantile      = 0.25, # lower percentile cutoff for LOW tier
  min_obs           = 3,    # minimum observations required for HIGH tier
  long_lived_cutoff = 0.3,  # max_fitted_ratio below this is long_lived
  fast_cutoff       = 0.9   # max_fitted_ratio above this is fast
)
final %>% count(category, tier)
#> # A tibble: 12 × 3
#>    category          tier       n
#>    <chr>             <chr>  <int>
#>  1 fast              HIGH       3
#>  2 fast              LOW       15
#>  3 fast              MEDIUM    23
#>  4 insufficient_data <NA>      29
#>  5 long_lived        HIGH       2
#>  6 long_lived        MEDIUM     9
#>  7 medium_lived      HIGH      11
#>  8 medium_lived      LOW       13
#>  9 medium_lived      MEDIUM    35
#> 10 no_heavy          HIGH      20
#> 11 no_heavy          LOW       15
#> 12 no_heavy          MEDIUM    25
final %>%
  filter(!is.na(half_life)) %>%
  arrange(half_life) %>%
  select(Protein, half_life, max_observed_heavy_ratio, confidence, category,
         tier) %>%
  head(10)
#> # A tibble: 10 × 6
#>    Protein     half_life max_observed_heavy_ratio confidence category tier  
#>    <fct>           <dbl>                    <dbl>      <dbl> <chr>    <chr> 
#>  1 Protein_166      1.46                     3.88    0.0105  fast     LOW   
#>  2 Protein_088      1.64                     2.58    0.0215  fast     LOW   
#>  3 Protein_002      1.78                     2.38    0.00614 fast     LOW   
#>  4 Protein_004      3.11                     2.33    0.0372  fast     MEDIUM
#>  5 Protein_152      3.69                     2.10    0.0244  fast     LOW   
#>  6 Protein_012      4.27                     2.28    0.0481  fast     MEDIUM
#>  7 Protein_009      4.69                     2.01    0.103   fast     MEDIUM
#>  8 Protein_062      4.76                     2.09    0.0490  fast     MEDIUM
#>  9 Protein_134      5.38                     3.14    0.0285  fast     LOW   
#> 10 Protein_194      5.39                     3.21    0.0128  fast     LOW

Step 7: Looking at individual turnover curves

visualizeResponseProtein() plots a protein’s peptide-level measurements alongside its fitted curve, so you can sanity-check the numbers by eye. show_weights = TRUE sizes each point by its quality weight from Step 3, and show_ic50 = TRUE marks the time the curve crosses target_response (here labeled t50, for half-life).

example_protein = "Protein_072"

final %>%
  filter(Protein == example_protein) %>%
  select(Protein, half_life, max_observed_heavy_ratio, max_fitted_ratio,
         confidence, category, tier)
#> # A tibble: 1 × 7
#>   Protein  half_life max_observed_heavy_r…¹ max_fitted_ratio confidence category
#>   <fct>        <dbl>                  <dbl>            <dbl>      <dbl> <chr>   
#> 1 Protein…      50.5                  0.912            0.780      0.378 medium_…
#> # ℹ abbreviated name: ¹​max_observed_heavy_ratio
#> # ℹ 1 more variable: tier <chr>
visualizeResponseProtein(
  data                 = ratios_weighted,
  protein_name         = example_protein,
  drug_name            = "Synthesis",
  precalculated_ratios = TRUE,
  ratio_response       = FALSE,
  transform_dose       = FALSE,
  weights              = ratios_weighted$weight,
  increasing           = TRUE,
  show_ic50            = TRUE,
  ic50_label           = "t50",
  add_ci               = FALSE,
  target_response      = 0.5,
  show_weights         = TRUE,
  y_lab                = "Synthesis Ratio",
  title                = paste(example_protein, "turnover"),
  x_lab                = "Time (hrs)",
  color_by             = "BaseSequence"
)

Optional: generate turnover curve reports for visual review

This groups proteins by category and tier (HIGH / MEDIUM / LOW) and plots their turnover curves together, so you can page through and eyeball a whole group at once. Pick one protein_list before running the plotting code.

library(gridExtra)

output_dir = tempdir()

# fast, high-confidence proteins
protein_list = final %>% filter(category == "fast", tier == "HIGH") %>% pull(Protein)

# fast, medium-confidence proteins
protein_list = final %>% filter(category == "fast", tier == "MEDIUM") %>% pull(Protein)

# medium-lived, high-confidence proteins
protein_list = final %>% filter(category == "medium_lived", tier == "HIGH") %>% pull(Protein)

# potential long-lived proteins (no detectable heavy signal), high-confidence
protein_list = final %>% filter(category == "no_heavy", tier == "HIGH") %>% pull(Protein)

plots = lapply(protein_list, function(p) {
  tryCatch({
    visualizeResponseProtein(
      data                 = ratios_weighted,
      protein_name         = p,
      drug_name            = "Synthesis",
      precalculated_ratios = TRUE,
      ratio_response       = FALSE,
      transform_dose       = FALSE,
      weights              = ratios_weighted$weight,
      increasing           = TRUE,
      show_ic50            = TRUE,
      add_ci               = FALSE,
      ic50_label           = "t50",
      target_response      = 0.5,
      show_weights         = TRUE,
      y_lab                = "Turnover Ratio",
      x_lab                = "time (hrs)",
      color_by             = "BaseSequence"
    ) +
      ggtitle(p) +
      theme(aspect.ratio = 1) +
      scale_y_continuous(limits = c(0, 1.5))
  }, error = function(e) {
    ggplot() + ggtitle(paste0(p, " (error)")) + theme_void()
  })
})

ggsave(
  filename = file.path(output_dir, "turnover_proteins.pdf"),
  plot     = marrangeGrob(plots, nrow = 3, ncol = 3, top = NULL),
  width    = 20, height = 16
)

write.csv(final, file.path(output_dir, "turnover_results.csv"),
          row.names = FALSE)

Session information

sessionInfo()
#> R version 4.6.2 (2026-10-29)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 26.04.1 LTS
#> 
#> Matrix products: default
#> BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.32.so;  LAPACK version 3.12.0
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> time zone: Etc/UTC
#> tzcode source: system (glibc)
#> 
#> attached base packages:
#> [1] stats     graphics  grDevices utils     datasets  methods   base     
#> 
#> other attached packages:
#> [1] data.table_1.18.6.1   ggplot2_4.0.4         dplyr_1.2.1          
#> [4] MSstatsResponse_1.3.7 BiocStyle_2.41.0     
#> 
#> loaded via a namespace (and not attached):
#>  [1] plotly_4.12.1       sass_0.4.10         utf8_1.2.6         
#>  [4] generics_0.1.4      tidyr_1.3.2         stringi_1.8.9      
#>  [7] digest_0.6.39       magrittr_2.0.5      evaluate_1.0.5     
#> [10] grid_4.6.2          RColorBrewer_1.1-3  fastmap_1.2.0      
#> [13] jsonlite_2.0.0      BiocManager_1.30.27 httr_1.4.9         
#> [16] purrr_1.2.2         viridisLite_0.4.3   scales_1.4.0       
#> [19] codetools_0.2-20    jquerylib_0.1.4     cli_3.6.6          
#> [22] rlang_1.3.0         withr_3.0.3         cachem_1.1.0       
#> [25] yaml_2.3.12         otel_0.3.0          tools_4.6.2        
#> [28] parallel_4.6.2      BiocParallel_1.47.0 buildtools_1.0.0   
#> [31] vctrs_0.7.3         R6_2.6.1            lifecycle_1.0.5    
#> [34] stringr_1.6.0       htmlwidgets_1.6.4   pkgconfig_2.0.3    
#> [37] pillar_1.11.1       bslib_0.12.0        gtable_0.3.6       
#> [40] glue_1.8.1          xfun_0.62           tibble_3.3.1       
#> [43] tidyselect_1.2.1    sys_3.4.3           knitr_1.52         
#> [46] farver_2.1.2        htmltools_0.5.9     labeling_0.4.3     
#> [49] rmarkdown_2.32      maketools_1.3.2     compiler_4.6.2     
#> [52] S7_1.0.0

References

  1. Szvetecz, S. et al. (2026). MSstatsResponse: Semi-parametric statistical model enhances detection of drug-protein interactions in chemoproteomics experiments. Molecular & Cellular Proteomics, 25(9), 101637.

  2. Choi, M., et al. (2014). MSstats: an R package for statistical analysis of quantitative mass spectrometry-based proteomic experiments. Bioinformatics, 30(17), 2524-2526.