henhaobio
Sign in

bioRxivBioinformaticsPreprint

Presto scales Wilcoxon and auROC analyses to millions of observations

Ilya KorsunskyiD, Aparna NathaniD, Nghia MillardiD, Soumya RaychaudhuriiD

PDFDOICode

Abstract

SummaryThe related Wilcoxon rank sum test and area under the receiver operator curve are ubiquitous in high dimensional biological data analysis. Current implementations do not scale readily to the increasingly large datasets generated by novel high-throughput technologies, such as single cell RNAseq. We introduce a simple and scalable implementation of both analyses, available through the R package Presto. Presto scales to big datasets, with functions optimized for both dense and sparse matrices. On a sparse dataset of 1 million observations, 10 groups, and 1,000 features, Presto performed both rank-sum and auROC analyses in only 17 seconds, compared to 6.4 hours with base R functions. Presto also includes functions to seamlessly integrate with the Seurat single cell analysis pipeline and the Bioconductor SingleCellExperiment class. Presto enables the use of robust classical analyses on big data with a simple interface and optimized implementation.\n\nAvailability and ImplementationPresto is available as an R package at https://github.com/immunogenomics/presto.\n\nContactsoumya@broadinstitute.org\n\nSupplementary InformationVignettes are available with the Presto package.

In-depth summary

Claude Opus 5.5 · xhigh effort · 17 Oct 2026 · from the full text of version 1 (29 May 2019) · CC BY 4.0

One-versus-all rank-sum across 10 groups and 1,000 features on a sparse 1-million-observation simulation finished in 17 seconds instead of 6.4 hours, with the same pass yielding auROC.

The Wilcoxon rank sum test and the area under the receiver operating characteristic curve are standard for picking out marker features, but the stock R implementations do not scale to the observation counts droplet-based single-cell assays now produce. Presto reimplements both in C++ with separate dense and sparse paths and plugs into Seurat and SingleCellExperiment, so existing pipelines can keep the classical test at single-cell scale.

Key results

  1. ShownRuntime drops from hours to seconds at the million-observation scale, with the sparse path gaining most.

    Simulated data, 10 groups and 1,000 features, 100,000 to 1 million observations on one processor without parallelization: base R took 38 minutes at 100,000 and 6.4 hours at 1 million, while Presto took 7 to 83 seconds dense (average 295X speedup) and 2 to 16 seconds sparse at 90% zeros (average 1448X). The summary quotes 17 seconds for the 1 million sparse case, just above the stated range. · Benchmarking; section 1

  2. ShownauROC is obtained at no extra cost by reusing the rank-sum statistic rather than computing a curve.

    For two groups of sizes N1 and N2 the implementation applies auROC = U / (N1*N2), so once the U statistic exists the second analysis is essentially free; both analyses are reported together in the benchmark timings. · Implementation details; section 1

  3. ClaimedThe speedup comes from vectorising the multi-group comparison and writing format-specific inner loops, not from approximating the test.

    Ranks are computed once per feature across all observations and reused for each one-versus-all group test, following the approach in MUDAN and Pagoda2; heavy steps are in C++ with in-place computation, using RcppArmadillo on a BLAS backend for dense input and direct access to the x, i and p fields of dgCMatrix for sparse input, since Armadillo's sparse support does not use BLAS. · Implementation details

  4. ClaimedThe single entry point wilcoxauc dispatches on Seurat objects, SingleCellExperiment objects or plain matrices, and claims the same tie handling and p-values as base R.

    An S3 class system casts dense inputs to matrix and sparse inputs to dgCMatrix; ties and p-values are stated to follow base R wilcox.test with unpaired=TRUE, correct=TRUE, exact=FALSE and two-sided alternative, and top_markers summarises per-group hits. No numerical comparison against wilcox.test output is reported. · Implementation details; Usage

Methods, data and reproducibility

An R package whose heavy computation is in C++: ranks per feature are cached and reused across one-versus-all group comparisons, with separate routines for dense matrices (RcppArmadillo over a BLAS backend) and sparse ones (direct operations on dgCMatrix internals), and auROC derived from the rank-sum U statistic. Performance was measured against base R on simulated matrices.

  • Simulated benchmark matrices with 10 groups and 1,000 features, dense and sparse (90% of entries set to zero) · n = 100,000 to 1 million observations
Methods & tools
Presto, R, C++, RcppArmadillo, Armadillo, BLAS, Matrix (dgCMatrix), Seurat, SingleCellExperiment, MUDAN, Pagoda2, devtools
Experimental conditions
Benchmarks on a single Intel Xeon E5-2690 v3 processor with no parallelization.
Reproducibility gaps
The availability statement reads that the package is at an address that the text does not carry; the only locator printed is the install_github argument immunogenomics/presto, and no package version or repository link is given.
Limitations (2)
  • Timings come from simulated matrices with one shape (10 groups, 1,000 features) and one sparsity level (90% zeros) on a single unparallelised processor, so behaviour with many groups, wider matrices or real data is untested here. · noted in this summary
  • Agreement with base R is asserted from how ties and p-values are computed, not demonstrated: no comparison of Presto and wilcox.test results, and no memory measurements, appear in this text. · noted in this summary

Read this if your single-cell marker-gene step runs Wilcoxon tests over hundreds of thousands of cells in R and you want the same statistic computed in seconds from a Seurat or SingleCellExperiment object.

Citations
159

Reproducibility ledger

Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.

Sign in to file a reproducibility report.

Similarity Map
SelectedSame fieldCross-field
THISAgostinis '22Tsuyuzaki '20Senabouth '19Amezquita '19Billato '25Andreatta '21
59% semantic matchGenomics
Federico Agostinis, Chiara Romualdi, Gabriele Sales+1 more·Bioinformatics·Mar 8, 2022· 6 citations