prolfqua 0.99.2
prolfqua covers the steps of a label-free quantification (LFQ) proteomics analysis: quality control, normalization, aggregation of peptides to proteins, modelling, hypothesis testing and sample size estimation (Wolski et al. 2022).
The package works with data in long format, one row per measured feature (protein, peptide, precursor) and sample. Three building blocks carry an analysis:
AnalysisConfiguration maps the columns of the table to their roles: the feature hierarchy (protein, peptide, …), the explanatory factors, the sample and the intensity column.LFQData holds the data together with its configuration. Its methods return helpers for transformation (get_Transformer()), aggregation (get_Aggregator()), summary statistics (get_Stats()), missing-value summaries (get_Summariser()) and plots (get_Plotter()).build_contrast_analysis() fits a model per protein and computes the requested contrasts. The method argument selects the model: linear models (lm, rlm, rfit), limma and limma-voom, DEqMS variance moderation, Firth logistic regression for presence/absence, mixed models and ROPECA on peptide-level data, and variants that impute groups without observations at the limit of detection.Every method returns an object with the same interface: get_contrasts(), get_Plotter(), get_missing() and to_wide(). Results of different methods therefore have the same columns and can be compared or combined directly.
Install prolfqua from Bioconductor with:
if (!requireNamespace("BiocManager", quietly = TRUE)) {
install.packages("BiocManager")
}
BiocManager::install("prolfqua")
The development version is available on GitHub:
BiocManager::install("fgcz/prolfqua")
We simulate peptide-level intensities for 100 proteins measured in three groups (A, B and Ctrl). sim_lfq_data_peptide_config() returns the data together with a matching AnalysisConfiguration.
library(prolfqua)
istar <- sim_lfq_data_peptide_config(Nprot = 100, seed = 1234)
lfqdata <- LFQData$new(istar$data, istar$config)
lfqdata$factors() |> head()
#> # A tibble: 6 × 3
#> sample sampleName group_
#> <chr> <chr> <chr>
#> 1 A_V1 A_V1 A
#> 2 A_V2 A_V2 A
#> 3 A_V3 A_V3 A
#> 4 A_V4 A_V4 A
#> 5 B_V1 B_V1 B
#> 6 B_V2 B_V2 B
We \(\log_2\) transform the intensities, scale them robustly, and aggregate the peptides to proteins with Tukey’s median polish.
lfqdata <- lfqdata$get_Transformer()$log2()$robscale()$lfq
lfqprot <- lfqdata$get_Aggregator()$aggregate()
lfqprot$get_Plotter()$intensity_distribution_density()
Figure 1: Distribution of the normalized protein intensities per sample
We compare groups A and B with the control group, using limma’s moderated linear model.
contrasts <- c(
"A_vs_Ctrl" = "group_A - group_Ctrl",
"B_vs_Ctrl" = "group_B - group_Ctrl"
)
fa <- build_contrast_analysis(lfqprot, "~ group_", contrasts, method = "limma")
res <- fa$get_contrasts()
head(res[, c("protein_Id", "contrast", "diff", "p.value", "FDR")])
#> # A tibble: 6 × 5
#> protein_Id contrast diff p.value FDR
#> <chr> <chr> <dbl> <dbl> <dbl>
#> 1 0EfVhX~3967 A_vs_Ctrl 0.199 0.000123 0.000397
#> 2 0YSKpy~2865 A_vs_Ctrl -0.175 0.00277 0.00554
#> 3 0m5WN4~6025 A_vs_Ctrl 0.178 0.0000160 0.0000726
#> 4 3QLHfm~8938 A_vs_Ctrl 0.214 0.00456 0.00807
#> 5 3QYop0~7543 A_vs_Ctrl -0.221 0.00000298 0.0000179
#> 6 76k03k~7094 A_vs_Ctrl -0.0822 0.00980 0.0156
fa$get_Plotter()$volcano()$FDR
Figure 2: Volcano plot of the two contrasts
All available methods are listed by list_facades():
names(list_facades())
#> [1] "binomial_nested" "deqms" "deqms_voom"
#> [4] "firth" "firth_nested" "limma"
#> [7] "limma_impute" "limma_voom" "limma_voom_impute"
#> [10] "limpa" "limpa_nested" "lm"
#> [13] "lm_impute" "lmer_nested" "rfit"
#> [16] "rfit_impute" "rlm" "ropeca_nested"
The package website https://fgcz.github.io/prolfqua/ holds the full set of tutorials:
AnalysisConfigurationbuild_contrast_analysis() methods side by sideThe vignette Comparing two groups with prolfqua is also part of this package.
sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.5 LTS
#>
#> Matrix products: default
#> BLAS: /home/biocbuild/bbs-3.24-bioc/R/lib/libRblas.so
#> LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0 LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
#> [3] LC_TIME=en_GB LC_COLLATE=C
#> [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: America/New_York
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] prolfqua_0.99.2 dplyr_1.2.1 BiocStyle_2.41.0
#>
#> loaded via a namespace (and not attached):
#> [1] Rdpack_2.6.6 gridExtra_2.3.1 sandwich_3.1-3
#> [4] rlang_1.3.0 magrittr_2.0.5 clue_0.3-68
#> [7] GetoptLong_1.1.1 multcomp_1.4-32 otel_0.2.0
#> [10] matrixStats_1.5.0 compiler_4.6.1 mgcv_1.9-4
#> [13] png_0.1-9 vctrs_0.7.3 pkgconfig_2.0.3
#> [16] shape_1.4.6.1 crayon_1.5.3 fastmap_1.2.0
#> [19] magick_2.9.1 backports_1.5.1 labeling_0.4.3
#> [22] utf8_1.2.6 promises_1.5.0 rmarkdown_2.32
#> [25] nloptr_2.2.1 UpSetR_1.4.1 tinytex_0.61
#> [28] purrr_1.2.2 xfun_0.62 glmnet_5.1
#> [31] jomo_2.7-6 logistf_1.26.1 cachem_1.1.0
#> [34] jsonlite_2.0.0 progress_1.2.3 later_1.4.8
#> [37] pan_2.0 prettyunits_1.2.0 broom_1.0.13
#> [40] parallel_4.6.1 cluster_2.1.8.3 R6_2.6.1
#> [43] stringi_1.8.9 bslib_0.12.0 RColorBrewer_1.1-3
#> [46] limma_3.99.2 boot_1.3-32 rpart_4.1.27
#> [49] jquerylib_0.1.4 estimability_2.0.0 Rcpp_1.1.2
#> [52] bookdown_0.48 iterators_1.0.14 knitr_1.52
#> [55] zoo_1.9-1 IRanges_2.47.5 httpuv_1.6.17
#> [58] Matrix_1.7-6 splines_4.6.1 nnet_7.3-21
#> [61] tidyselect_1.2.1 dichromat_2.0-1 yaml_2.3.12
#> [64] doParallel_1.0.17 codetools_0.2-20 lattice_0.23-1
#> [67] tibble_3.3.1 plyr_1.8.9 shiny_1.14.0
#> [70] withr_3.0.3 S7_0.2.2 coda_0.19-4.1
#> [73] evaluate_1.0.5 survival_3.8-12 circlize_0.4.18
#> [76] pillar_1.11.1 BiocManager_1.30.27 mice_3.19.0
#> [79] KernSmooth_2.23-27 foreach_1.5.2 stats4_4.6.1
#> [82] reformulas_0.4.4 plotly_4.12.1 generics_0.1.4
#> [85] hms_1.1.4 S4Vectors_0.51.10 ggplot2_4.0.3
#> [88] scales_1.4.0 minqa_1.2.8 xtable_1.8-8
#> [91] glue_1.8.1 lazyeval_0.2.3 emmeans_2.0.4
#> [94] tools_4.6.1 data.table_1.18.6.1 lme4_2.0-6
#> [97] forcats_1.0.1 mvtnorm_1.4-2 Cairo_1.7-0
#> [100] grid_4.6.1 tidyr_1.3.2 crosstalk_1.2.2
#> [103] rbibutils_2.4.1 colorspace_2.1-4 nlme_3.1-171
#> [106] formula.tools_1.7.1 cli_3.6.6 viridisLite_0.4.3
#> [109] ComplexHeatmap_2.29.0 gtable_0.3.6 sass_0.4.10
#> [112] digest_0.6.39 operator.tools_1.6.3.1 BiocGenerics_0.59.12
#> [115] ggrepel_0.9.8 TH.data_1.1-5 htmlwidgets_1.6.4
#> [118] rjson_0.2.23 farver_2.1.2 htmltools_0.5.9
#> [121] lifecycle_1.0.5 httr_1.4.9 mime_0.13
#> [124] GlobalOptions_0.1.4 mitml_0.4-5 statmod_1.5.2
#> [127] MASS_7.3-66