This R package provides an implementation of the MaxLFQ method by Cox et al. (2014) in a comprehensive pipeline for DIA-MS (Pham et al. 2020; Pham et al. 2026). It also offers options for protein quantification using the N most intense fragment ions, using all fragment ions, Tukey's median polish algorithm, a robust linear model, and feature weighting. In general, the tool can be used to integrate multiple proportional observations into a single quantitative value.
Citation
Pham TV, Tran CTM, Henneman AA, Pham LHC, Le DG, Can AH, Bui PHL, Piersma SR, Jimenez CR. Boosting the speed and accuracy of protein quantification algorithms in mass spectrometry-based proteomics. Journal of Proteome Research 2026 Feb 6; 25(2):1198-1203. https://doi.org/10.1021/acs.jproteome.5c01038
For version 1.x.x, please cite
Pham TV, Henneman AA, Jimenez CR. iq: an R package to estimate relative protein abundances from ion quantification in DIA-MS-based proteomics, Bioinformatics 2020 Apr 15;36(8):2611-2613. https://doi.org/10.1093/bioinformatics/btz961
The package is hosted on CRAN. It is best to install from within R.
install.packages("iq")
The package can be loaded in the usual manner
library("iq")
See a recent example for processing a Spectronaut output.
Or an older vignette for processing output from Spectronaut, OpenSWATH and MaxQuant with some visualization.
To process a DIA-NN output with process
The function process reads a DIA-NN report, filters and normalizes the data, quantifies all proteins and writes a table with one row per protein and one column per sample, in one call. It reads a .parquet file directly (with the package arrow), a tab-separated text file such as report.tsv, or a data frame, with the same arguments for all three. By default, it uses the precursor quantities Precursor.Normalised per Run, keeps Q.Value and PG.Q.Value below 0.01, and quantifies with the maxlfq-bit method. The estimates of each protein are then rescaled so that their mean equals the mean of its data in log2 space (rescale_method = "to_mean"); use rescale_method = NULL for no rescaling.
The filters in the following examples are those for a DIA-NN match-between-runs (MBR) search.
iq::process("report.parquet", "report-protein-group.txt",
sample_id = "Run",
intensity_col = "Precursor.Normalised",
annotation_col = c("Protein.Names", "Genes"),
filter_double_less = c("Q.Value" = "0.01",
"PG.Q.Value" = "0.05",
"Lib.Peptidoform.Q.Value" = "0.01",
"Global.Q.Value" = "0.01",
"Global.PG.Q.Value" = "0.01"),
method = "maxlfq_bit",
log2_intensity_cutoff = 0)
To use the MS/MS fragment intensities instead (DIA-NN 2.x with the --export-quant option), give the fragment columns.
iq::process("report.parquet", "report-protein-group.txt",
intensity_col = paste0("Fr.", 0:11, ".Quantity"),
intensity_col_id = paste0("Fr.", 0:11, ".Id"),
annotation_col = c("Protein.Names", "Genes"),
filter_double_less = c("Q.Value" = "0.01",
"PG.Q.Value" = "0.05",
"Lib.Peptidoform.Q.Value" = "0.01",
"Global.Q.Value" = "0.01",
"Global.PG.Q.Value" = "0.01"))
To add the number of fragments and peptides per protein, the peptides, the summed intensities (XIC) and the sequence coverage, give a function that maps a precursor id to its peptide sequence and, for the coverage, the protein sequences from a FASTA file that the data were searched with.
fasta <- iq::read_fasta_file("uniprot_human.fasta")
iq::process("report.parquet", "report-protein-group.txt",
sample_id = "Run",
intensity_col = "Precursor.Normalised",
annotation_col = c("Protein.Names", "Genes"),
filter_double_less = c("Q.Value" = "0.01",
"PG.Q.Value" = "0.05",
"Lib.Peptidoform.Q.Value" = "0.01",
"Global.Q.Value" = "0.01",
"Global.PG.Q.Value" = "0.01"),
method = "maxlfq_bit",
log2_intensity_cutoff = 0,
peptide_extractor = function(x) gsub("\\(UniMod:\\d+\\)|\\d", "", x),
rfasta = fasta)
The extractor above removes the modifications and the charge, e.g. (UniMod:1)AAAAAAGAGPEMVR2 becomes AAAAAAGAGPEMVR. Other quantification methods are chosen with method, see ?process for all options. For data too large to fit in memory, see the iq data format below.
To process a Spectronaut output
Use this export schema iq.rs to make a long report, for example "Spectronaut_Report.xls".
< 7986 div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="iq::process("Spectronaut_Report.xls", output_filename = "iq-MaxLFQ.tsv", sample_id = "R.FileName", primary_id = "PG.ProteinGroups", secondary_id = c("EG.Library", "FG.Id", "FG.Charge", "F.FrgIon", "F.Charge", "F.FrgLossType"), intensity_col = "F.PeakArea", annotation_col = c("PG.Genes", "PG.ProteinNames", "PG.FastaFiles"), filter_string_equal = c("F.ExcludedFromQuantification" = "False"), filter_double_less = c("PG.Qvalue" = "0.01", "EG.Qvalue" = "0.01"), log2_intensity_cutoff = 0) ">iq::process("Spectronaut_Report.xls",
output_filename = "iq-MaxLFQ.tsv",
sample_id = "R.FileName",
primary_id = "PG.ProteinGroups",
secondary_id = c("EG.Library", "FG.Id", "FG.Charge", "F.FrgIon",
"F.Charge", "F.FrgLossType"),
intensity_col = "F.PeakArea",
annotation_col = c("PG.Genes", "PG.ProteinNames", "PG.FastaFiles"),
filter_string_equal = c("F.ExcludedFromQuantification" = "False"),
filter_double_less = c("PG.Qvalue" = "0.01", "EG.Qvalue" = "0.01"),
log2_intensity_cutoff = 0)