GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Qasim-Hussain-Code/msqrob2_lfq_proteomics_pipeline: Label-free DDA proteomics differential abundance analysis, benchmarked against a spike-in study with known ground truth and applied to an arginine transporter knockout in Francisella tularensis.

BranchesTags
Open more actions menu

Latest commit

 

History

34 Commits
34 Commits

Folders and files

NameName
Last commit message
Last commit date
config
config
 
 
data
data
 
 
figures
figures
 
 
results
results
 
 
scripts
scripts
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

Where FDR control holds and where it fails in label-free DDA proteomics, measured on a spike-in and applied to a Francisella argP knockout

Summary

This repository runs one label-free differential abundance workflow twice. First on a dataset where the answer is known: the Shen et al. spike-in (PXD003881), a constant human digest with E. coli lysate at five concentrations, four runs each, in which every one of the 740 quantified E. coli proteins truly changes between any two conditions and every one of the 3,852 human proteins truly does not. Sixteen variants of the workflow (two normalisations, two summarisations, protein-level or peptide-level model, robust estimation on or off, plus limma as the reference) were scored against that truth on all ten pairwise contrasts. The variant that ranked proteins best at a realised false discovery proportion of 5 per cent was median-of-ratios normalisation, robust summarisation and a protein-level robust linear model in msqrob2. Its realised false discovery proportion at a nominal 5 per cent FDR was 4.5 per cent for the b against a contrast (true log2 fold change 0.58) and 13.7 per cent for the largest gap (e against a); seven of the ten contrasts came in above 5 per cent. Ridge regression, off by default because it multiplies the fitting time by 26, brings the e against a figure to 8.2 per cent and leaves three contrasts above 5 instead of seven. That workflow was then applied to the Ramond et al. Francisella dataset (PXD001584): wild type against an argP deletion, three cultures per genotype, each run three times. Modelling the culture as a random intercept gives 195 proteins at 5 per cent FDR; treating the 18 runs as 18 replicates gives 360, with standard errors a median 1.37 times too small. All 50 ribosomal proteins tested are lower in the knockout and 26 are significant, which agrees in direction with the published finding. Every number here is read from a file in results/ that a script in scripts/ wrote; the whole run from a fresh clone took 28 minutes and peaked at 1.7 GB of memory on one core.

Background

A label-free DDA proteomics experiment digests each sample's proteins into peptides, separates the peptides by liquid chromatography, and lets the mass spectrometer pick the most intense ions it sees at each moment for fragmentation and identification. Each run is one sample. The quantity recorded per identified peptide is the area of its ion current over elution time, and MaxQuant writes those areas into a peptides.txt table with one row per peptide and one intensity column per run.

The measurement unit is the peptide, not the protein. A protein does not enter the instrument; six or thirty of its tryptic fragments do, each with its own ionisation efficiency, so two peptides from one protein can differ in intensity by a factor of a thousand while both report the same abundance. Getting from peptides to a protein estimate is a modelling step, called summarisation here, and the benchmark below shows what happens when it is done with a column median instead of a model.

If you know RNA-seq, several things are different. The values are continuous intensities, roughly log-normal once the run-to-run shift is removed, not counts, so the statistics look like limma on microarrays rather than DESeq2 on counts. Missing values are the rule, not the exception: 23 per cent of the intensity cells in the spike-in table and 49 per cent in the Francisella table are zero, and a zero in MaxQuant means "not quantified in this run", which happens preferentially to low-abundance peptides because the instrument only fragments what it can see. The missingness is therefore informative about intensity, imputing it as if it were random would pull every low protein towards the imputed value, and msqrob2's choice is to fit each protein on the cells that were observed and impute nothing. The depth is smaller: 4,592 proteins here against the ten to twenty thousand genes of a typical RNA-seq experiment, so each false positive is a larger share of the list.

The second dataset adds a design problem that RNA-seq people do also meet. Each Francisella culture was injected three times. Those three runs share the culture's own biology, so they are correlated, and a model that counts them as three independent samples believes it has 18 observations when it has six. The random intercept (1 | biorep) is the fix, and the comparison with the model that omits it is the most useful thing in the repository.

Data

Spike-in benchmark Francisella knockout
Source Shen et al. 2018, PNAS 115(21):E4767 Ramond et al. 2015, Mol Cell Proteomics 14(4):870
ProteomeXchange PXD003881 PXD001584
Organism Human digest background with E. coli K-12 lysate Francisella tularensis subsp. novicida U112 (TaxID 401614)
Design 5 spike-in levels (3, 4.5, 6, 7.5, 9 per cent w/w) x 4 runs 2 genotypes (WT, argP deletion "D8", locus FTN_0848) x 3 cultures x 3 technical runs
Runs 20 18
Instrument Orbitrap Fusion Q Exactive Plus
Search MaxQuant 1.6.1.0, UniProt human + E. coli (07/06/2018) + contaminants, trypsin/P, 2 missed cleavages, match between runs, 1 per cent PSM FDR (Sticker et al. 2020 reanalysis) MaxQuant 1.4.1.2 (Ramond et al.)
Peptides in table 32,827 10,693
Ground truth 4,313 E. coli accessions from the UniProt reference proteome UP000000625 none; published direction for ribosomal proteins

The two peptide tables and the E. coli FASTA are fetched from the statOmics msqrob2data GitHub repository by scripts/02_download_data.sh, cached with BiocFileCache in data/.BiocFileCache/, and checked against the SHA-256 values in config/data_manifest.tsv. They are not tracked in git; data/README.md says what belongs there. The raw mass spectrometry files are not used.

The Francisella run names look like 1WT_20_2h_n3_1. Ramond et al. describe the compared condition in their methods: cultures resuspended in chemically defined medium with arginine reduced fivefold from the standard 2.3 mM to 0.46 mM (one sentence in the methods says 0.43 mM; the rest of the paper says 0.46), "cultivated for 2 h", with label-free samples prepared for wild type and mutant at 1 h and 2 h and at both arginine concentrations. The 2h token is therefore the 2 h time point. The 20 token is consistent with 20 per cent of the standard arginine concentration (0.46 / 2.3), which is the reduced-arginine condition the paper reports, but neither the paper nor the PRIDE sample annotation for PXD001584 defines the file-name tokens, so that reading is an inference. Only the 18 runs of this one condition were deposited.

Pipeline

Every stage reads project.conf, which scripts/00_configure.sh writes from the detected or supplied thread count and memory. The R stages source scripts/lib_common.R, which also holds two functions the msqrob2 book uses that the released msqrob2 1.18.0 does not export (nfLogMedianOfRatios and msqrobCollect), reimplemented from the package's development source.

  1. Read (03_build_qfeatures.R). data.table::fread with integer64 = "double", because MaxQuant intensities are 64-bit integers and readQFeatures stores their bit pattern as a double without any error if they arrive as integer64. The design tables are parsed from the column names and written to config/samples_*.tsv. A real study should ship a design table written by whoever prepared the samples; a file name cannot be asked about run order or digestion batch, and the spike-in MDS below shows exactly the structure such a table would have explained.
  2. Missing values (04_preprocess.R). Zeros become NA with zeroIsNA. A zero here is the absence of a measurement, mostly for low-intensity peptides; kept as a number it would enter every median, normalisation factor and variance estimate as the most extreme value in the column.
  3. Log2. The demonstration peptide SYPLDIHNVQDHLK (from E. coli P0ABT2, quantified in all 20 runs) has a within-condition standard deviation that rises from 2.96e8 at 3 per cent spike to 1.10e9 at 9 per cent on the raw scale, a 3.7-fold increase with the mean; on the log2 scale it moves from 0.21 to 0.29 (results/tables/04_log2_demo_peptide_sd.tsv).
  4. Filter. Peptides with no protein assignment or a shared assignment (; in Proteins), decoys and contaminants are removed: 32,827 to 30,905 to 30,661 peptides for the spike-in, 10,693 to 10,554 to 10,461 for Francisella. Then an observation filter: a spike-in peptide must be quantified in at least 4 of the 20 runs (27,850 remain), a Francisella peptide in at least 2 of the 6 cultures (7,542 remain). Four runs is one whole condition and is an arbitrary choice; results/spikein/06_min_obs_sensitivity.tsv shows that 2 to 6 changes the b against a true positives between 445 and 449 and leaves the e against a false discovery proportion at 13.6 to 13.7 per cent. All of these criteria depend on identification metadata, not on the intensities the test statistic is built from. That independence is what keeps filtering from enriching the truly unchanged proteins for large test statistics and breaking the Benjamini-Hochberg guarantee.
  5. Normalise. Median of ratios by default: a reference profile is the per-peptide mean of log2 intensities, and each run's factor is the median of its deviations from that profile. The factors span -0.20 to +0.23 log2 units across the 20 spike-in runs and -0.42 to +0.35 across the 18 Francisella runs (results/tables/04_normalisation_factors.tsv). Median centering is the benchmarked alternative.
  6. Summarise. aggregateFeatures with MsCoreUtils::robustSummary, which fits log2 intensity = peptide effect + run effect per protein with Huber weights and returns the run effects. 4,592 spike-in proteins (740 E. coli, 3,852 human, median 4 peptides each, 829 with one peptide) and 1,180 Francisella proteins (176 with one peptide). For 238 spike-in and 81 Francisella proteins MASS::rlm had not converged after its default 20 iterations and the iteration-20 estimate is used; the counts are in results/tables/04_summarisation_summary.tsv.
  7. Explore. Classical MDS on the protein-level data, with an ANOVA of each dimension on the design factor and on the factor the design does not use (results/tables/04_mds_tests.tsv).
  8. Model. Spike-in: ~ condition. Francisella: ~ genotype + (1 | biorep), and deliberately also ~ genotype. Robust M-estimation on, ridge off, contrasts with makeContrast, design drawn with ExploreModelMatrix::VisualizeDesign (figures/design_spikein.png, figures/design_francisella.png), hypothesisTest, Benjamini-Hochberg within each contrast.
  9. Benchmark first (05_benchmark_workflows.R), then infer (06_spikein_inference.R, 07_francisella_inference.R), then draw (08_figures.R) and report (09_report.qmd).

Imputation is not performed. The impute() call is left in 04_preprocess.R as a comment with the assumption it would take on.

Results

Quality control

Log2 removes most of the dependence of spread on mean. The raw standard deviation of the demonstration peptide grows 3.7-fold from the lowest to the highest spike-in level; the log2 standard deviation grows 1.4-fold. The model assumes constant variance across conditions, so the right-hand panel is the scale it is fitted on.

Raw and log2 intensity of one E. coli peptide across the 20 runs

Summarisation is a model, and it has to be, because the peptides of one protein disagree by orders of magnitude. The 33 peptides of E. coli DnaK (P0A6Y8) span eight log2 units within a single run. robustSummary estimates a peptide effect for each of them and returns the run effects as the protein profile, which is the staircase on the right.

Peptides and protein profile for P0A6Y8

The second MDS dimension of the spike-in is acquisition order, which the design does not contain. Dimension 1 is spike-in condition (R-squared 1.00). Dimension 2 has nothing to do with condition (R-squared 0.06) and is explained by replicate number (R-squared 0.66, p = 4.6e-4): runs 1 and 2 of each condition sit low, runs 3 and 4 sit high, with two exceptions, a1, which sits with the high group, and a3, which sits between. The msqrob2 book's listing of the raw file names says the runs were acquired in two blocks (a1 to e1, e2 to a2, then a3 to e3, e4 to a4) and that a1 was re-acquired at the very end. That matches the picture exactly, and it is the kind of batch a design table with an acquisition-date column would have let the model absorb. It is left unmodelled here because the benchmark's purpose is to score the standard workflow, and because the blocks are balanced across conditions, so they cost power rather than bias.

MDS of the spike-in protein data, coloured by condition and by replicate

In the Francisella data the cultures, not the genotypes, are the dominant structure. Culture explains 98 per cent of MDS dimension 1 and 97 per cent of dimension 2; genotype explains 75 per cent of dimension 1. The three runs of each culture sit on top of each other. This is the picture of pseudo-replication before any model is fitted.

MDS of the Francisella protein data

Part one: the benchmark decides the workflow

Sixteen arms, ten contrasts each, scored on the 740 E. coli and 3,852 human proteins. The full table is results/benchmark/05_benchmark_summary.tsv; one row per arm, averaged over contrasts, is results/benchmark/05_benchmark_arm_overview.tsv. The ten contrasts are every pair of the five spike-in levels, so the true log2 fold change runs from 0.26 (e against d) to 1.58 (e against a).

Normalisation Summarisation Model Estimation Contrasts with FDP above 5 per cent Mean realised FDP Max FDP TP (sum) FP (sum) Sensitivity at realised FDP 5 per cent Seconds
median of ratios robustSummary msqrob, protein level robust 7 0.076 0.137 4,608 427 0.615 7
median of ratios peptide-level model msqrobAggregate robust 8 0.111 0.199 4,712 673 0.609 248
median of ratios robustSummary msqrob, protein level OLS 7 0.064 0.111 4,415 337 0.595 6
median of ratios robustSummary limma eBayes OLS 7 0.068 0.111 4,401 354 0.588 0.3
median centering robustSummary msqrob, protein level robust 8 0.172 0.510 4,478 1,474 0.567 7
median of ratios peptide-level model msqrobAggregate OLS 6 0.057 0.117 4,099 303 0.563 189
median centering robustSummary msqrob, protein level OLS 8 0.150 0.473 4,275 1,206 0.546 5
median centering robustSummary limma eBayes OLS 8 0.156 0.480 4,263 1,251 0.541 0.3
median centering peptide-level model msqrobAggregate robust 9 0.237 0.557 4,600 2,187 0.513 250
median centering peptide-level model msqrobAggregate OLS 6 0.130 0.371 3,939 918 0.481 185
median of ratios column medians msqrob, protein level robust 10 0.182 1.000 2,694 224 0.339 7
median of ratios column medians msqrob, protein level OLS 4 0.047 0.077 2,484 149 0.335 6
median of ratios column medians limma eBayes OLS 6 0.083 0.250 2,473 165 0.325 0.4
median centering column medians msqrob, protein level OLS 5 0.068 0.133 2,373 212 0.306 5
median centering column medians msqrob, protein level robust 9 0.198 1.000 2,588 317 0.301 7
median centering column medians limma eBayes OLS 7 0.108 0.333 2,348 222 0.296 0.3

The decision rule is written in 05_benchmark_workflows.R and recorded in results/benchmark/05_chosen_workflow.tsv: among the protein-level msqrob arms without ridge, take the one with the highest sensitivity at a realised false discovery proportion of 5 per cent, averaged over the ten contrasts, breaking ties by lower realised FDP at the nominal cut-off. The restriction to protein-level arms is because part two needs protein summaries for its mixed model. The winner is median of ratios, robustSummary, robust estimation, with 0.615; it also happens to be the best arm of any kind on that criterion, by a small margin over the peptide-level robust model at 0.609.

Four things in this table matter more than the winner.

Normalisation is the largest effect. Swapping median of ratios for median centering, with everything else fixed, takes the false positive count from 427 to 1,474 and the worst-contrast FDP from 13.7 to 51 per cent. Median centering assumes the median peptide in each run is unchanged; in a spike-in, every E. coli peptide moves up together and the human median moves down to compensate. Median of ratios anchors each run to a between-run reference profile and is less exposed to it.

Column-median summarisation loses 40 per cent of the true positives. 2,694 against 4,608 for the same normalisation and model, because a protein's median jumps whenever a bright peptide is missing from one run. It also produces the two arms whose realised FDP reaches 1.0: for d against c they call one and two proteins respectively, all of them human.

limma is close to msqrob with the same preprocessing, and worse on nothing that matters. With median of ratios and robustSummary, limma's eBayes on the protein summaries gives 4,401 true positives and 354 false positives against msqrob OLS's 4,415 and 337, at a mean realised FDP of 0.068 against 0.064, in 0.3 seconds instead of 6. limma also leaves only 61 proteins without a result, against 156 fit errors for msqrob OLS and 192 for msqrob robust, because it moderates the variance of proteins with zero residual degrees of freedom instead of refusing to fit them. Robust M-estimation buys 193 more true positives than OLS at the cost of 90 more false positives and a mean FDP of 0.076 against 0.064; it is the choice the benchmark's ranking criterion makes, and the OLS arm's better calibration is a fair reason to prefer it instead.

Realised FDP and sensitivity per contrast for the chosen arm and five single-factor departures from it

The peptide-level model ranks proteins better at small fold changes and then lands its 5 per cent cut-off at a higher realised FDP. In the TPR against FDP curves the green line (~ condition + (1 | sample) + (1 | Sequence) fitted on peptides) is above the red one for d against c and e against d, the two smallest true changes, and its sensitivity at the nominal cut-off is higher in nine of ten contrasts. So is its realised FDP: the open circle, where a 5 per cent adjusted p-value cut-off lands, sits further right than the protein-level model's in nine of ten contrasts, 19.2 against 13.7 per cent for e against a. It also costs 248 seconds against 7, its 829 single-peptide proteins have to be refitted with the protein-level formula because a peptide random effect cannot be estimated from one peptide, and lme4 reported a singular fit (a random-effect variance at zero) for 4,690 of the fits. The book that this workflow is adapted from reaches the same conclusion, that the improvement is real and small.

TPR against FDP for the same six arms, per contrast

Fold-change estimates are close to the truth for every arm except column medians. For the chosen arm the E. coli bias runs from -0.11 (d against a) to +0.05 (e against d) log2 units, with a mean absolute error of 0.12 to 0.25. Human proteins, whose truth is zero, have a median estimate of -0.06 for e against a and within 0.07 of zero everywhere.

Fold-change error by arm

Ridge regression is the better-calibrated method, and it is off by default only because of what it costs. --ridge refits all twelve msqrob arms with ridge = TRUE (limma has no ridge option); the results are in results/benchmark/05_benchmark_arm_overview_ridge.tsv, 05_benchmark_summary_ridge.tsv and 05_benchmark_timing_ridge.tsv. With the chosen preprocessing, the protein-level robust arm goes from seven contrasts above the nominal 5 per cent to three, from a mean realised FDP of 0.076 to 0.048 and from a worst contrast of 13.7 per cent (e against a) to 8.2, while keeping the true positives (4,620 against 4,608) and dropping the false positives from 427 to 255. The peptide-level robust arm with ridge has the highest sensitivity at 5 per cent realised FDP of any arm, 0.663 against 0.615 for the default choice, with two contrasts above nominal, a mean FDP of 0.038, 4,608 true and 205 false positives; the peptide-level OLS arm with ridge is the only arm with no contrast above nominal, at the cost of 644 true positives. The price is time. A protein-level ridge fit takes 150 to 195 seconds against 5 to 7 without; a peptide-level ridge fit 308 to 467 seconds against 185 to 250; the twelve ridge arms take 2,949 seconds against 974 for the sixteen default arms. Ridge needs more than one slope in the fixed effects, so it does not apply to the Francisella model and part two is unaffected. On a design with three or more groups and the time to spare, ridge is the choice this benchmark supports; the default here is a cost decision, and the table says what it costs.

Arm, median of ratios Ridge Contrasts with FDP above 5 per cent Mean FDP Max FDP TP (sum) FP (sum) Sensitivity at realised FDP 5 per cent Seconds
protein level, robustSummary, robust off 7 0.076 0.137 4,608 427 0.615 7
protein level, robustSummary, robust on 3 0.048 0.082 4,620 255 0.643 181
protein level, robustSummary, OLS off 7 0.064 0.111 4,415 337 0.595 6
protein level, robustSummary, OLS on 2 0.036 0.072 4,333 180 0.621 165
peptide level, robust off 8 0.111 0.199 4,712 673 0.609 248
peptide level, robust on 2 0.038 0.076 4,608 205 0.663 467
peptide level, OLS off 6 0.057 0.117 4,099 303 0.563 189
peptide level, OLS on 0 0.021 0.047 3,964 107 0.615 357

The benchmark stage without ridge takes 974 seconds serially, of which the four peptide-level arms take 873; the ridge stage takes 2,949 seconds and peaks at 1,585 MB.

Part one: the chosen workflow on all ten contrasts

Model: ~ condition, robust M-estimation, median of ratios, robustSummary, Benjamini-Hochberg within each contrast, alpha 0.05. 4,592 proteins; 192 returned a fit error and carry NA in every contrast. Table: results/spikein/06_spikein_performance.tsv.

Contrast True log2 FC Tested Significant E. coli (TP) Human (FP) Realised FDP Sensitivity Median E. coli log2 FC
b - a 0.585 4,383 468 447 21 4.5 % 60.4 % 0.574
c - b 0.415 4,361 347 320 27 7.8 % 43.2 % 0.377
d - c 0.322 4,362 242 234 8 3.3 % 31.6 % 0.290
e - d 0.263 4,368 272 265 7 2.6 % 35.8 % 0.329
c - a 1.000 4,377 585 543 42 7.2 % 73.4 % 0.950
d - b 0.737 4,367 560 514 46 8.2 % 69.5 % 0.674
e - c 0.585 4,358 546 506 40 7.3 % 68.4 % 0.634
d - a 1.322 4,383 644 587 57 8.9 % 79.3 % 1.254
e - b 1.000 4,366 663 581 82 12.4 % 78.5 % 1.007
e - a 1.585 4,379 708 611 97 13.7 % 82.6 % 1.591

FDR control holds for the small gaps and fails for the large ones. Of 4,592 protein groups, 468 came back significant for b against a; 447 are E. coli and 21 are human, a realised false discovery proportion of 4.5 per cent against a nominal 5. d against c and e against d, the two contrasts with the smallest true change, come in at 3.3 and 2.6 per cent, slightly conservative. e against a is 13.7 per cent, e against b is 12.4, and seven of the ten contrasts exceed the nominal level. At a nominal 1 per cent the same contrasts realise 0.8 (b against a) and 4.5 per cent (e against a); at a nominal 10 per cent, 7.5 and 24.3 (results/spikein/06_alpha_sensitivity.tsv). The failure scales with the true fold change, not with the significance threshold.

Realised FDP per contrast for the chosen workflow

The explanation I find most plausible, and it is an explanation rather than an excuse, has two parts. Every spiked protein moves in the same direction, so a normalisation that assumes most features are unchanged is pulled towards the E. coli shift, and the human background is shifted the other way by exactly that amount. Then, in the 9 per cent samples, the added E. coli peptides compete for ionisation with the human ones, so human intensities fall for a physical reason as well. Both effects push human proteins downward in the high-spike samples, and the false positives carry that signature: of the 97 human proteins called for e against a, 79 have a negative log2 fold change, with a median of -0.21, while the median human estimate over all 3,852 proteins is -0.06. For b against a, 17 of the 21 false positives are positive, which is what a mixture of ordinary noise looks like. I trust b against a, d against c and e against d as tests of the method; I would not quote a 5 per cent FDR for e against a or e against b without saying that the realised figure was 12 to 14 per cent. Ridge regression brings those two contrasts to 8.2 and 7.5 per cent, at 26 times the fitting time; the benchmark section has the numbers.

Volcano plots for all ten contrasts; red dashed line is the true E. coli log2 fold change

Fold changes carry a small bias, downward for most contrasts. The median E. coli estimate is 0.574 against a truth of 0.585 for b against a, 0.950 against 1.000 for c against a, 1.254 against 1.322 for d against a, then 1.591 against 1.585 for e against a. The bias is between -0.11 and +0.05 log2 units across contrasts and is not a simple function of the gap.

Estimated against true log2 fold change

The strongest true positive and the strongest false positive of e against a look alike at the protein level. P0A799 (E. coli phosphoglycerate kinase) has a log2 fold change of 1.74 against a truth of 1.58, adjusted p 3.3e-16, with its peptides stepping up together through the five conditions. Q96M86 (human) has a log2 fold change of 1.60 and adjusted p 2.7e-8. It is quantified by a single peptide, observed in 17 of the 20 runs, that rises with the spike-in level as smoothly as any E. coli peptide does. That is either a peptide MaxQuant assigned to the human entry that in fact comes from the lysate, a contaminant of the human digest that scales with it, or a real false positive; I cannot tell which from this table, and it is counted as a false positive because the design says it is one.

Peptide and protein data for the top true positive and the top false positive of e against a

Fit errors are proteins the model cannot see enough of. 192 of 4,592 proteins returned a fitError under the chosen arm. 167 of them were never observed in at least one of the five conditions, so a contrast involving that condition has no data; the other 25 were observed in all five conditions but in 7 or fewer runs in total, leaving no residual degrees of freedom once five means are estimated (results/spikein/06_fit_error_summary.tsv). They are reported as NA and counted, not dropped; OLS returns 156, limma 61.

Part two: the Francisella argP knockout

Model used, in the script, in the comment above the call and here: ~ genotype + (1 | biorep). Reference level WT, so the single parameter genotypeD8 is the log2 fold change of the deletion strain against wild type. Model fitted for comparison: ~ genotype. Same preprocessing as the benchmark chose; 1,180 proteins. Tables in results/francisella/.

Mixed model ~ genotype + (1 | biorep) Naive model ~ genotype
Proteins with a result 1,115 1,122
Significant at 5 per cent FDR 195 (136 down, 59 up) 360
Significant in both 193 193
Significant in this model only 2 167
Median standard error of the genotype effect 0.126 0.090
Median residual degrees of freedom 14.6 17.1
Significant at 1 per cent FDR 109 249
Significant at 10 per cent FDR 268 443

Ignoring the culture structure nearly doubles the list, and every extra protein is a standard error that was too small. The naive model adds 167 proteins and removes 2. The two models' point estimates are almost identical (median absolute log2 fold change 0.174 against 0.170); what differs is the uncertainty. The mixed model's standard error is a median 1.37 times the naive one, with an interquartile range of 1.00 to 1.70; for 22 per cent of proteins it reaches or exceeds 1.73, the square root of three, which is what three perfectly correlated runs would give. The share of variance sitting between cultures, estimated by lme4 per protein, has a median of 0.42 and exceeds 0.5 for 447 of 1,078 proteins (results/francisella/07_variance_components_summary.tsv). For the 188 proteins whose culture variance is estimated at zero the ratio is about 0.95; those are the proteins on which the two models agree.

Volcano plots under the two models

Standard errors under the two models, and the culture share of variance

The naive-only calls are the culture-driven ones. WP_003040289 (type V CRISPR-associated protein Cpf1) is the strongest of them: log2 fold change 0.42, adjusted p 3.8e-5 in the naive model, 0.062 in the mixed one. In the detail plot the three WT_n3 runs sit well below the other two WT cultures, which is one culture behaving differently and not a genotype effect. The median absolute log2 fold change of the 167 naive-only proteins is 0.29.

Peptides and protein profile for the two strongest mixed-model hits and one naive-only call

Ribosomal proteins are lower in the knockout, which agrees with Ramond et al. Fifty proteins whose MaxQuant name begins "30S ribosomal protein" or "50S ribosomal protein" were tested. All 50 have a negative log2 fold change; 26 are significant in the mixed model, every one of them downward, against 8.7 expected if ribosomal proteins were called at the background rate (Fisher's exact odds ratio 5.7, p = 1.2e-8). Their median log2 fold change is -0.32 against -0.005 for the other 1,065 tested proteins (Wilcoxon p = 4.9e-17). Ramond et al. said 38 of the 48 ribosomal proteins they analysed, 79 per cent, were in lower amounts in the mutant; this independent reanalysis with a different summarisation, normalisation and test agrees on the direction for 100 per cent of them and on significance for 52 per cent. The naive model would have claimed 42. This is a keyword check on protein names against the background of the 1,115 tested proteins, not a GO enrichment; a proper enrichment needs an annotation for every tested protein, and I did not build one.

Ribosomal proteins against all other proteins under the mixed model

Row-scaled intensities of the 195 mixed-model significant proteins

The strongest hits are a hypothetical protein (WP_003040849, log2 fold change -1.14, 10 peptides), NADPH quinone reductase MdaB (WP_003033719, -1.18, one peptide, so treat with care), an RNA helicase (WP_003038816, -1.58, 12 peptides) and 30S ribosomal protein S13 (WP_003014373, -0.48). ArgP itself does not appear under any arginine-related name in the MaxQuant table; the only such protein quantified is arginine--tRNA ligase, unchanged (log2 fold change -0.05, adjusted p 0.59).

Sixty-five proteins have no mixed-model result, for three reasons. The mixed model has no result for 65 proteins: 28 were never observed in one genotype, 22 had too few observations for the model, and 15 were fitted but returned NA for the genotype effect because their observations come from a single culture in at least one genotype, which leaves the genotype effect confounded with the culture intercept (results/francisella/07_fit_error_summary.tsv). The naive model has no result for 58. Requiring peptides in 3 or 4 cultures instead of 2 changes the mixed-model count to 214 and 206 and the naive count to 367 and 364 (07_min_biorep_sensitivity.tsv).

Repository structure

msqrob2_lfq_proteomics_pipeline/
├── config/
│   ├── data_manifest.tsv         the three input files, URLs, SHA-256, sizes
│   ├── environment.yml           conda environment for the Linux/macOS route
│   ├── samples_spikein.tsv       design table, parsed from column names
│   └── samples_francisella.tsv   design table, parsed from column names
├── scripts/
│   ├── 00_configure.sh           writes project.conf
│   ├── 01_install.sh             R packages, conda or existing R
│   ├── 02_download_data.sh       fetch and verify inputs
│   ├── 03_build_qfeatures.R      read, annotate, QFeatures
│   ├── 04_preprocess.R           NA, log2, filter, normalise, summarise, QC
│   ├── 05_benchmark_workflows.R  the factorial benchmark
│   ├── 06_spikein_inference.R    chosen workflow, ten contrasts
│   ├── 07_francisella_inference.R mixed against naive
│   ├── 08_figures.R              results figures
│   ├── 09_report.qmd             full report with sessionInfo
│   ├── lib_common.R              shared helpers
│   └── run_all.sh                orchestrator
├── results/
│   ├── benchmark/                05_*.tsv
│   ├── spikein/                  06_*.tsv, ecoli_accessions.txt
│   ├── francisella/              07_*.tsv
│   ├── tables/                   03_, 04_, 08_ tables
│   ├── logs/                     resource_usage.tsv, run_all_timing.tsv
│   ├── report/09_report.html     rendered report
│   ├── software_versions.tsv
│   └── sessionInfo.txt
├── figures/                      every PNG referenced above
├── data/                         inputs, not tracked; see data/README.md
├── .gitignore
├── LICENSE
└── README.md

Usage

# detect CPU and RAM, write project.conf (add --threads N --ram GB to override)
bash scripts/00_configure.sh --yes

# R packages: conda route on Linux/macOS, the existing R with BiocManager on Windows
bash scripts/01_install.sh

# 47 MB of peptide tables and FASTA, cached, SHA-256 checked
bash scripts/02_download_data.sh

# everything else, in order
bash scripts/run_all.sh --from qfeatures

# or one stage, or the benchmark without its slow peptide-level arms
bash scripts/run_all.sh --only figures
bash scripts/run_all.sh --skip-peptide-model

# the optional ridge arms (slow; see the timing table)
bash scripts/run_all.sh --only benchmark --ridge

run_all.sh --help lists every stage. Everything runs on one core by default; --workers N switches BiocParallel to MulticoreParam (or SnowParam on Windows), and the comment on that flag in lib_common.R says why the default is serial: each worker holds its own copy of the data, and on a 4 GB machine two workers run out of memory before they save time.

Measured on the machine that produced these results (Windows 11, R 4.5.2, one worker; results/logs/resource_usage.tsv, peak resident set from the operating system):

Stage Wall-clock Peak RSS
03 build QFeatures 4 s 890 MB
04 preprocess and QC figures 43 s 1,598 MB
05 benchmark, 16 arms 974 s 1,667 MB
05 benchmark, 12 ridge arms (optional, --ridge) 2,949 s 1,585 MB
06 spike-in inference, with threshold sensitivity 188 s 1,530 MB
07 Francisella inference, both models 216 s 1,191 MB
08 figures 19 s 1,419 MB
09 report 23 s

A second run of scripts/run_all.sh from a fresh git clone into an empty directory, on the same machine with another R job running alongside, completed with exit code 0 in 27 minutes 39 seconds (1,659 s by the orchestrator's own clock; benchmark 1,087 s, spike-in 218 s, Francisella 219 s) and reproduced every table in results/spikein/, results/francisella/ and the benchmark metrics to the digit, with only the timing column differing. Peak memory across the run is 1.7 GB, inside the 4 GB this was sized for. Disk: 47 MB of inputs, about 190 MB of results including the untracked QFeatures objects, 1.5 GB of R packages if they are not already installed.

Limitations

FDR control failed on the contrasts with the largest true changes. The realised false discovery proportion at a nominal 5 per cent was 13.7 per cent for e against a and 12.4 for e against b, and seven of ten contrasts were above 5. The pattern of the false positives (79 of 97 negative for e against a) points at the normalisation assumption and at ion suppression in the high-spike runs. Ridge regression brings the worst contrast to 8.2 per cent and is off by default because it multiplies the fitting time by about 26. A method that cannot be trusted at 5 per cent on a spike-in of this size should be quoted with its realised number, and I have.

A spike-in study is not a biological experiment. Every truly changed protein moves in the same direction by the same factor, the background is identical in every sample, and there is no biological replication at all: the four runs of a condition are four aliquots. The benchmark therefore says how the workflow behaves on a favourable, if strained, signal structure. It does not say what its false discovery proportion would be on the Francisella comparison, where the truth is unknown and the changes run in both directions.

The Francisella design supports a genotype effect estimated from six cultures. That is three per group. The mixed model's median residual degrees of freedom are 14.6 because msqrob2 computes them from the standardised residuals of all 18 runs after the culture intercepts are fitted, not from the number of cultures; the number of independent biological units is still six, and a genotype effect that rests on one culture out of three is fragile in a way that no standard error captures. Fifteen proteins were fitted and still returned no genotype effect for exactly that reason. The ribosomal finding does not move with the threshold choices tested here, but "ribosomal" is a keyword match on MaxQuant names and the background is the 1,115 tested proteins, so it is a check on the published direction and not an enrichment analysis.

The MaxQuant searches were not run here. Sticker et al.'s 1.6.1.0 search of the spike-in and Ramond et al.'s 1.4.1.2 search of the Francisella data, with their FASTA files, modification settings and 1 per cent PSM FDR, are inherited by everything downstream, including the definition of which peptides are unique to a protein. The 2018 UniProt E. coli FASTA is also what defines truth: a protein in the human search space that is in fact an E. coli contaminant of the lysate would be scored as a false positive.

The second MDS dimension of the spike-in follows acquisition order and is not in the model. Two other choices are arbitrary and reported as such: the observation filters (4 runs, 2 cultures) and the 5 per cent threshold. MASS::rlm did not converge within 20 iterations for 238 spike-in and 81 Francisella protein summaries, and the iteration-20 estimates were used. The peptide-level arms produced singular lme4 fits for most proteins. The conda environment in config/environment.yml pins the versions that ran, but it was not exercised on this Windows machine, where the packages were installed into the existing R 4.5.2 through BiocManager; the brief asked for R 4.6 or later, and this run used R 4.5.2 with Bioconductor 3.22 because that is the release the installed Bioconductor binaries belong to. Two helper functions from the msqrob2 development version were reimplemented in lib_common.R because msqrob2 1.18.0 does not export them.

Data availability

Spike-in: ProteomeXchange PXD003881 (Shen et al. 2018); the MaxQuant 1.6.1.0 peptides.txt and the E. coli FASTA used here are the files served at https://github.com/statOmics/msqrob2data/raw/refs/heads/main/dda/shen/peptides.txt and https://github.com/statOmics/msqrob2data/raw/refs/heads/main/dda/shen/ecoli_up000000625_7_06_2018.fasta. Francisella: ProteomeXchange PXD001584 (Ramond et al. 2015); the MaxQuant 1.4.1.2 peptides.txt is https://raw.githubusercontent.com/statOmics/msqrob2data/refs/heads/main/dda/francisellaFull/peptides.txt. SHA-256 values for all three are in config/data_manifest.tsv.

results/ holds every table quoted above, the per-protein results for both datasets (spikein/06_spikein_results.tsv.gz, 4,592 proteins by ten contrasts; francisella/07_francisella_results.tsv, 1,180 proteins under both models), the benchmark tables, the resource log, the rendered report and sessionInfo.txt. The serialised QFeatures objects are regenerated by the scripts and are not tracked.

Citation

Methods and software this analysis depends on:

  • Goeminne, L.J.E., Gevaert, K. and Clement, L. Peptide-level robust ridge regression improves estimation, sensitivity, and specificity in data-dependent quantitative label-free shotgun proteomics. Mol. Cell. Proteomics 15(2), 657-668 (2016). doi:10.1074/mcp.M115.055897
  • Sticker, A., Goeminne, L., Martens, L. and Clement, L. Robust summarization and inference in proteome-wide label-free quantification. Mol. Cell. Proteomics 19(7), 1209-1219 (2020). doi:10.1074/mcp.RA119.001624
  • Vandenbulcke, S. et al. msqrob2TMT: robust linear mixed models for inferring differential abundant proteins in labeled experiments with arbitrarily complex design. Mol. Cell. Proteomics 24(7), 101002 (2025). doi:10.1016/j.mcpro.2025.101002
  • Gatto, L. and Vanderaa, C. QFeatures: quantitative features for mass spectrometry data. Bioconductor package, version 1.20.0. doi:10.18129/B9.bioc.QFeatures
  • Clement, L. et al. msqrob2: robust statistical inference for quantitative LC-MS proteomics. Bioconductor package, version 1.18.0. doi:10.18129/B9.bioc.msqrob2. The package's own citation() entry points to Goeminne et al. 2016 and Sticker et al. 2020 above.
  • Ritchie, M.E. et al. limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Res. 43(7), e47 (2015). doi:10.1093/nar/gkv007

Source data:

  • Shen, X. et al. IonStar enables high-precision, low-missing-data proteomics quantification in large biological cohorts. Proc. Natl. Acad. Sci. USA 115(21), E4767-E4776 (2018). PMID 29743190. doi:10.1073/pnas.1800541115. ProteomeXchange PXD003881.
  • Ramond, E. et al. Importance of host cell arginine uptake in Francisella phagosomal escape and ribosomal protein amounts. Mol. Cell. Proteomics 14(4), 870-881 (2015). PMID 25616868. doi:10.1074/mcp.M114.044552. ProteomeXchange PXD001584.

Teaching source the workflow is adapted from:

  • Vanderaa, C., Vandenbulcke, S. and Clement, L. Statistical analysis of mass spectrometry-based proteomics data (the msqrob2 book), https://statomics.github.io/msqrob2book/, chapters on DDA basics, benchmarking, workflow optimisation and the Francisella case study.
  • statOmics. Proteomics Data Analysis for Data-dependent and Data-independent acquisition (PDA), https://statomics.github.io/PDA/.

Both are licensed CC BY-SA 4.0. The pipeline order, the filtering criteria, the contrast construction and the single-peptide refit follow them; the prose here is mine.

License

Code is released under the MIT License; see LICENSE. Material adapted from the msqrob2 book and the PDA course is used under the Creative Commons Attribution-ShareAlike 4.0 International licence, with credit as above, and the parts of this README that adapt it remain under CC BY-SA 4.0.

About

Label-free DDA proteomics differential abundance analysis, benchmarked against a spike-in study with known ground truth and applied to an arginine transporter knockout in Francisella tularensis.

Topics

bacterial-pathogenesisbioconductorbioinformaticscomputational-biologyddadifferential-abundancefalse-discovery-ratefrancisella-tularensislabel-free-quantificationlfqmass-spectrometrymaxquantmixed-modelsmsqrob2proteomicspseudo-replicationqfeaturesrrobust-regressionspike-in-benchmark

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.