Sample Provenance Quality Resolver in Proteomics
Overview
Detect sample-provenance inconsistencies and potential mix-ups in mass-spectrometry-based plasma-proteome cohorts. Provides a clustering-based approach (build a nearest-neighbour graph in a dimensionality-reduced space and iteratively split large components by edge weight), a threshold-based approach (classify sample pairs as belonging or not-belonging from a pairwise distance cutoff), parameter optimization over distance metrics and cutoffs, and a pairwise random-forest classifier for protein importance ranking. This is a native R port of the author's Python package 'spqrp' (https://github.com/fhradilak/spqrp), implementing methods from an associated manuscript currently in preparation.
Initial CRAN-targeted release. Native R port of the Python spqrp
package.
Features
- **Clustering pipeline** (
run_clustering()) -- kNN graph in a PCA/UMAP/MDS embedding, optional iterative split of large components, ggplot visualization with patient-hue colouring and legend. - **Threshold-based evaluation** (
perform_distance_evaluation_on_ranked_proteins()) -- pairwise sample classification from a percentile cutoff on pairwise distances, with FN/FP/percentile-overlay histogram. - **Protein ranking** (
train_with_normalise()) -- pairwise random- forest classifier with three selectable backends;randomForestis the default (closest behaviour to Python'simblearn.BalancedRandomForestClassifier). Importance values are normalised to sum to 1.0, matching sklearn'sclf.feature_importances_convention.
Show all changes in 0.1.0Hide the rest of the changes in 0.1.0
- **Isolation-forest outlier filtering** (
remove_outlier_samples()) -- pure-R via thesolitudepackage; defaultoutlier_thresholdcalibrated empirically for solitude's anomaly-score scale.
Verbosity
All functions are silent by default. Pass quiet = FALSE to any
function that emits status output to see progress messages, per-call
summaries, save-path hints, and cluster listings. Warnings about
genuine data issues -- e.g. samples dropped from analysis -- fire
regardless of quiet.
Documentation
- See
articles/numerical-divergence.mdfor known cross-language divergences (UMAP, random-forest backends, isolation-forest scales, MDS solvers) and recommendations for cross-language comparison. - See
vignette("spqrp-mock-data")for a worked example on a small bundled cohort.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK7 OK2026-06-18
Documentation
- Help pages
- 32 (15 internal)includes a package overview page
- Examples that run
- 44%7 run in a plain check · 9 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- spqrp on mock data HTML
Downloads
Repository
Releases over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/fhradilak/spqrp_r on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Dependencies
Installing spqrp adds 44 packages (24 with compiled code, 45 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, data.table 5.7 MB.
Code & Tests
Datasets
People & History
- 0.1.0Latest2026-06-17 · current release
- RR 4.6.0 released · 2026-04-24
Package metadata
- First published
- 2026-06-17
- Total releases
- 1 / 1 yrs
- License
- GPL-3 OSI
- Minimum R
- ≥ 4.5.0
- Bundled data
- 9.6 KB / 1 file
- Download size
- 230 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("spqrp")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.