iRT-peptide-calibration-and-scoring
Summary
Validates retention time (RT) linearity and instrument calibration by fitting a linear regression model to extracted ion chromatograms (XICs) of known iRT peptide standards, using their annotated iRT scores as the independent variable. The R-squared value (target ≥0.99) quantifies the degree of linear RT behavior across the peptide set.
When to use
When you need to assess whether retention times measured on a given LC-MS run follow the expected linear relationship defined by iRT peptide standards (e.g., Pierce or Biognosys iRT peptides). This is appropriate when you have extracted XICs for 11+ known iRT peptides from a raw mass spectrometry file and want to validate instrument RT calibration quality or establish a RT prediction model for peptide identification.
When NOT to use
- When the input raw file does not contain iRT peptide standards or the peptides were not ionized/detected (XICs are empty or sparse).
- When fewer than 5–6 iRT peptides are confidently detected; the regression requires sufficient degrees of freedom and coverage of the RT range.
- When you are analyzing a non-Orbitrap or non-Thermo instrument; the rawrr package is specific to Thermo Fisher Scientific .NET assemblies and .raw files.
Inputs
- Thermo Fisher Scientific .raw file (Orbitrap instrument data)
- List of known iRT peptide precursor m/z values
- Annotated iRT reference scores (e.g., Pierce iRT standard peptides)
- Mass tolerance parameter (e.g., 10 ppm)
Outputs
- rawrrChromatogram object (fitted intensity traces)
- Vector of rtFittedAPEX values (observed RT at peak maximum for each peptide)
- Linear regression model object (lm class in R)
- R-squared value quantifying RT linearity
- Residual plot or diagnostic statistics
How to apply
Extract precursor m/z values and measured retention times for each iRT peptide standard using the rawrr::readChromatogram() function with mass tolerance ~10 ppm and XIC filter type. Fit intensity traces stored in rawrrChromatogram objects to identify the retention time at maximum intensity (rtFittedAPEX) for each peptide. Construct a linear regression model lm(rtFittedAPEX ~ iRTscore) where iRTscore is the annotated reference score for each peptide. Report the resulting R-squared value; values ≥0.99 indicate highly linear RT behavior and good instrument calibration. Lower R-squared values may suggest drift, temperature variation, or column degradation.
Related tools
- rawrr (R package providing direct access to Thermo Orbitrap .raw file data; used to read file headers, extract XICs, and retrieve spectrum metadata) — https://github.com/fgcz/rawrr
- RawFileReader (.NET assembly (C#) underlying rawrr; implements low-level chromatogram and spectrum reading from binary .raw files) — https://github.com/thermofisherlsms/RawFileReader
- R base (stats::lm) (Fits linear regression model to RT observations and iRT scores; computes R-squared and residuals)
Examples
C <- rawrr::readChromatogram(rawfile, mass = iRTmz, tol = 10, type = "xic", filter = "ms"); m <- lm(rtFittedAPEX ~ iRTscore); summary(m)$r.squared
Evaluation signals
- R-squared value is ≥0.99 for iRT regression, confirming highly linear RT behavior across the 11+ peptides.
- Residual plot shows no systematic trend (e.g., funnel or sine pattern), indicating homoscedasticity and model validity.
- All iRT peptides are detected (non-empty XICs) and rtFittedAPEX values span the full RT range of the run without outliers.
- Fitted model coefficients (intercept and slope) are stable across replicate measurements of the same raw file, indicating reproducibility.
- Root mean square error (RMSE) or mean absolute error (MAE) of predicted vs. observed RT is <0.5 min, depending on method-specific tolerance.
Limitations
- The rawrr package and RawFileReader .NET assembly are specific to Thermo Fisher Scientific Orbitrap instruments and .raw files; not applicable to other vendor formats (e.g., Bruker .d, Waters .raw, AB Sciex .wiff).
- On Windows systems, the decimal symbol must be configured as '.' for proper data extraction; regional locale settings can cause parsing errors.
- The quality of the regression depends on confident detection and annotation of iRT peptides; missing or misidentified peptides (e.g., due to ionization suppression or coelution) will reduce R-squared.
- RT linearity assumes stable column conditions and temperature; significant drift or column degradation during the run can artificially lower R-squared even with good instrument calibration.
- The choice of mass tolerance (e.g., 10 ppm) and XIC extraction filter directly affects which scans are included; too loose a tolerance may capture co-eluting interferents, biasing rtFittedAPEX.
Evidence
- [results] Extract precursor m/z and RT using rawrr::readChromatogram() with mass tolerance and XIC filter: "Extract precursor m/z values and retention times for known iRT peptide standards using rawrr::readChromatogram() with mass tolerance 10 ppm and XIC filter."
- [results] Fit intensity traces to extract rtFittedAPEX and construct linear regression model: "we extract the RTs at the maximum of the fitted intensity traces stored in the
rawrrChromatogram object and fit a linear model"
- [results] R-squared of 0.9999 indicates highly linear RT behavior: "The corresponding R-squared indicates that the RTs behave highly linear"
- [intro] rawrr wraps RawFileReader .NET assembly for direct access to Orbitrap data: "rawrr wraps the functionality of the RawFileReader .NET assembly"
- [intro] Gap in R ecosystem for raw data reading; rawrr closes this for direct analysis pipelines: "A library providing raw data reading would finally close the gap and facilitate modular end-to-end analysis pipeline development in R"
- [discussion] Windows decimal symbol configuration requirement: "On Windows, the decimal symbol has to be configured as a '.'!"
- [methods] iRT regression model fitting on known peptide standards: "Fit intensity traces stored in rawrrChromatogram objects to extract retention times at maximum intensity (rtFittedAPEX)."
1---2name: irt-peptide-calibration-and-scoring3description: Use when when you need to assess whether retention times measured on a given LC-MS run follow the expected linear relationship defined by iRT peptide standards (e.g., Pierce or Biognosys iRT peptides).4license: CC-BY-4.05---67# iRT-peptide-calibration-and-scoring89## Summary1011Validates retention time (RT) linearity and instrument calibration by fitting a linear regression model to extracted ion chromatograms (XICs) of known iRT peptide standards, using their annotated iRT scores as the independent variable. The R-squared value (target ≥0.99) quantifies the degree of linear RT behavior across the peptide set.1213## When to use1415When you need to assess whether retention times measured on a given LC-MS run follow the expected linear relationship defined by iRT peptide standards (e.g., Pierce or Biognosys iRT peptides). This is appropriate when you have extracted XICs for 11+ known iRT peptides from a raw mass spectrometry file and want to validate instrument RT calibration quality or establish a RT prediction model for peptide identification.1617## When NOT to use1819- When the input raw file does not contain iRT peptide standards or the peptides were not ionized/detected (XICs are empty or sparse).20- When fewer than 5–6 iRT peptides are confidently detected; the regression requires sufficient degrees of freedom and coverage of the RT range.21- When you are analyzing a non-Orbitrap or non-Thermo instrument; the rawrr package is specific to Thermo Fisher Scientific .NET assemblies and .raw files.2223## Inputs2425- Thermo Fisher Scientific .raw file (Orbitrap instrument data)26- List of known iRT peptide precursor m/z values27- Annotated iRT reference scores (e.g., Pierce iRT standard peptides)28- Mass tolerance parameter (e.g., 10 ppm)2930## Outputs3132- rawrrChromatogram object (fitted intensity traces)33- Vector of rtFittedAPEX values (observed RT at peak maximum for each peptide)34- Linear regression model object (lm class in R)35- R-squared value quantifying RT linearity36- Residual plot or diagnostic statistics3738## How to apply3940Extract precursor m/z values and measured retention times for each iRT peptide standard using the rawrr::readChromatogram() function with mass tolerance ~10 ppm and XIC filter type. Fit intensity traces stored in rawrrChromatogram objects to identify the retention time at maximum intensity (rtFittedAPEX) for each peptide. Construct a linear regression model lm(rtFittedAPEX ~ iRTscore) where iRTscore is the annotated reference score for each peptide. Report the resulting R-squared value; values ≥0.99 indicate highly linear RT behavior and good instrument calibration. Lower R-squared values may suggest drift, temperature variation, or column degradation.4142## Related tools4344- **rawrr** (R package providing direct access to Thermo Orbitrap .raw file data; used to read file headers, extract XICs, and retrieve spectrum metadata) — https://github.com/fgcz/rawrr45- **RawFileReader** (.NET assembly (C#) underlying rawrr; implements low-level chromatogram and spectrum reading from binary .raw files) — https://github.com/thermofisherlsms/RawFileReader46- **R base (stats::lm)** (Fits linear regression model to RT observations and iRT scores; computes R-squared and residuals)4748## Examples4950```51C <- rawrr::readChromatogram(rawfile, mass = iRTmz, tol = 10, type = "xic", filter = "ms"); m <- lm(rtFittedAPEX ~ iRTscore); summary(m)$r.squared52```5354## Evaluation signals5556- R-squared value is ≥0.99 for iRT regression, confirming highly linear RT behavior across the 11+ peptides.57- Residual plot shows no systematic trend (e.g., funnel or sine pattern), indicating homoscedasticity and model validity.58- All iRT peptides are detected (non-empty XICs) and rtFittedAPEX values span the full RT range of the run without outliers.59- Fitted model coefficients (intercept and slope) are stable across replicate measurements of the same raw file, indicating reproducibility.60- Root mean square error (RMSE) or mean absolute error (MAE) of predicted vs. observed RT is <0.5 min, depending on method-specific tolerance.6162## Limitations6364- The rawrr package and RawFileReader .NET assembly are specific to Thermo Fisher Scientific Orbitrap instruments and .raw files; not applicable to other vendor formats (e.g., Bruker .d, Waters .raw, AB Sciex .wiff).65- On Windows systems, the decimal symbol must be configured as '.' for proper data extraction; regional locale settings can cause parsing errors.66- The quality of the regression depends on confident detection and annotation of iRT peptides; missing or misidentified peptides (e.g., due to ionization suppression or coelution) will reduce R-squared.67- RT linearity assumes stable column conditions and temperature; significant drift or column degradation during the run can artificially lower R-squared even with good instrument calibration.68- The choice of mass tolerance (e.g., 10 ppm) and XIC extraction filter directly affects which scans are included; too loose a tolerance may capture co-eluting interferents, biasing rtFittedAPEX.6970## Evidence7172- [results] Extract precursor m/z and RT using rawrr::readChromatogram() with mass tolerance and XIC filter: "Extract precursor m/z values and retention times for known iRT peptide standards using rawrr::readChromatogram() with mass tolerance 10 ppm and XIC filter."73- [results] Fit intensity traces to extract rtFittedAPEX and construct linear regression model: "we extract the RTs at the maximum of the fitted intensity traces stored in the `rawrrChromatogram` object and fit a linear model"74- [results] R-squared of 0.9999 indicates highly linear RT behavior: "The corresponding R-squared indicates that the RTs behave highly linear"75- [intro] rawrr wraps RawFileReader .NET assembly for direct access to Orbitrap data: "rawrr wraps the functionality of the RawFileReader .NET assembly"76- [intro] Gap in R ecosystem for raw data reading; rawrr closes this for direct analysis pipelines: "A library providing raw data reading would finally close the gap and facilitate modular end-to-end analysis pipeline development in R"77- [discussion] Windows decimal symbol configuration requirement: "On Windows, the decimal symbol has to be configured as a '.'!"78- [methods] iRT regression model fitting on known peptide standards: "Fit intensity traces stored in rawrrChromatogram objects to extract retention times at maximum intensity (rtFittedAPEX)."