Package: CLAMP 0.99.11

Marc Subirana-Granes

CLAMP: Curated Latent-variable Analysis with Molecular Priors

CLAMP performs prior-informed latent variable decomposition of high-dimensional transcriptomic data. It integrates curated gene sets to learn biologically interpretable latent variables, supports file-backed matrices for large datasets, and provides tools for preprocessing, normalization, projection, and evaluation of latent structures. CLAMP is designed to scale to tens of thousands of samples, making it suitable for large public resources such as recount3 and ARCHS4. It enables researchers to uncover biologically meaningful patterns that connect genes, pathways, and complex traits in transcriptomics studies.

Authors:Marc Subirana-Granes [aut, cre], Maria Chikina [aut], Alexander McKim [ctb], National Human Genome Research Institute [fnd], Eunice Kennedy Shriver National Institute of Child Health and Human Development [fnd], National Science Foundation [fnd], National Eye Institute [fnd]

CLAMP_0.99.11.tar.gz
CLAMP_0.99.11.zip(r-4.7-x86_64)CLAMP_0.99.11.zip(r-4.7-arm64)CLAMP_0.99.11.zip(r-4.6-x86_64)CLAMP_0.99.11.zip(r-4.6-arm64)CLAMP_0.99.11.zip(r-4.5-x86_64)
CLAMP_0.99.11.tgz(r-4.6-x86_64)CLAMP_0.99.11.tgz(r-4.6-arm64)CLAMP_0.99.11.tgz(r-4.5-x86_64)CLAMP_0.99.11.tgz(r-4.5-arm64)
CLAMP_0.99.11.tar.gz(r-4.7-arm64)CLAMP_0.99.11.tar.gz(r-4.7-x86_64)CLAMP_0.99.11.tar.gz(r-4.6-arm64)CLAMP_0.99.11.tar.gz(r-4.6-x86_64)
CLAMP_0.99.11.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
CLAMP/json (API)

# Install 'CLAMP' in R:
install.packages('CLAMP', repos = c('https://bioc.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/chikinalab/clamp/issues

Pkgdown/docs site:https://chikinalab.github.io

Uses libs:
  • openblas– Optimized BLAS
  • c++– GNU Standard C++ Library v3
Datasets:

On BioConductor:CLAMP-0.99.10(bioc 3.24)

softwaregeneexpressionrnaseqtranscriptomicsdimensionreductionvisualizationnormalizationpathwayspreprocessinggenepredictiongenetargetopenblascpp

6.91 score 5 stars 17 scripts 598 downloads 40 exports 68 dependencies

Last updated from:eb513622c2. Checks:1 NOTE, 15 OK. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksNOTE219
linux-devel-arm64OK251
linux-devel-x86_64OK351
source / vignettesOK672
linux-release-arm64OK249
linux-release-x86_64OK346
macos-release-arm64OK187
macos-release-x86_64OK345
macos-oldrel-arm64OK222
macos-oldrel-x86_64OK535
windows-devel-arm64OK354
windows-devel-x86_64OK350
windows-release-arm64OK336
windows-release-x86_64OK294
windows-oldrel-x86_64OK240
wasm-releaseOK157

Exports:allAgainstAllAUCsCLAMPbaseCLAMPdotplotCLAMPdotplotAllCLAMPfullCLAMPfullnVPCLAMPplotTopZCLAMPplotUcleanFBMcompareBscompute_svdcpmCLAMPcpmCLAMPFBMcross_ZYdifferentialLVActivityfilterFBMfindSplineMaxgetChatgetGMTgetMatchedPathwayMatgetMatchedPathwayMatListgetScaleFromSVsgmtListToSparseMatmat_multnum.pconeToOneMaskplotTopZ_ComplexpreprocessCLAMPpreprocessCLAMPFBMprojectCLAMPread_gmtridge_Bselect_clamp_kselect_svd_ksolveUsquashZscoretscalewinsor_topkzscoreCLAMPzscoreCLAMPFBM

Dependencies:bigassertrbigparallelrbigstatsrBiocGenericsbitcirclizecliclueclustercodetoolscolorspaceComplexHeatmapcowplotcpp11crayondigestdoParalleldplyrfarverffflockforeachgenericsGetoptLongggplot2ggrepelglmnetGlobalOptionsgluegtableIRangesirlbaisobanditeratorslabelinglatticelifecyclemagrittrMatrixmatrixStatsparallellypatchworkpillarpkgconfigpngpsR6RColorBrewerRcppRcppArmadilloRcppEigenRhpcBLASctlrjsonrlangrmioRSpectrarsvdS4VectorsS7scalesshapesurvivaltibbletidyselectutf8vctrsviridisLitewithr

Analyzing human RNA-Seq data with CLAMP
Installation | Load packages | Introduction | Workflow overview | Quick Start | Available datasets | Computing the SVD and inferring k | Example 1: In-memory data.frame (Whole Blood) | Load example data | Preprocess and z-score | Compute SVD and infer k | CLAMPbase initialization | Prepare pathway priors | CLAMPfull | Display significant latent variables | Example 2: File-Backed Matrix (Alzheimer’s Brain) | Cleanup old FBM files | Computing CPM on a File-Backed Matrix (FBM) | HDF5 schema | Load HDF5 expression | Construct file‑backed FBM | CPM, preprocess and z‑score FBM | CLAMPbase | Example 3: Tab-Delimited Count File (Pancreatic Islets) | Load count data and map gene symbols | Aggregate counts by gene symbol | CPM, preprocess and z-score | Differential latent-variable expression between conditions | Projection: Applying one CLAMP model to another dataset | Choosing the Number of Latent Variables (CLAMP_K) | Elbow method (default) | Permutation method | Gavish–Donoho optimal hard threshold (PCAtools) | Visualization | Pathway–LV association heatmap (CLAMPplotU) | Top-gene loading plot (CLAMPplotTopZ) | Single-LV pathway dot plot (CLAMPdotplot) | All-LV pathway dot plot (CLAMPdotplotAll) | Parallelization in CLAMP | Session Information

Last update: 2026-09-10
Started: 2025-07-22

Comparing CLAMPbase and CLAMPfull
Overview | 1. Load Data and Normalize | 2. Load Prior Knowledge Matrices | 3. Compute SVD and Infer k | 4. Fit CLAMPbase and CLAMPfull | 5. Compare CLAMPbase vs CLAMPfull | 6. Inspect Named Matrix Outputs | 7. Verify FBM Implementation | Session Information

Last update: 2026-05-06
Started: 2026-02-03

Readme and manuals

Help Manual

Help pageTopics
Compute all-vs-all AUC matrixallAgainstAllAUCs
Compute AUC using Wilcoxon rank-sum testAUC
Adjust p-values using Benjamini-Hochberg methodBH
Binarize matrix by top-k values per columnbinarizeTop
Cell-type deconvolution matrixcelltypeTargets
CLAMP base matrix factorizationCLAMPbase
Dot plot of top pathways for a single latent variableCLAMPdotplot
Dot plot of pathway-LV associations across all latent variablesCLAMPdotplotAll
Runs the streamlined full CLAMP model.CLAMPfull
Full CLAMP model with prior information and cross-validationCLAMPfullnVP
Plot top genes per LV by Z loadingCLAMPplotTopZ
Plot the U matrix (pathway-LV associations) as a heatmapCLAMPplotU
Clean a Filebacked Big Matrix (FBM) by log-transforming and handling NAscleanFBM
Find common row names between two matrices or data framescommonRows
Compare two sets of factor loadings or embeddingscompareBs
Compute a truncated SVD for a CLAMP input matrixcompute_svd
Compute row-wise sum and sum of squares for a Filebacked Big MatrixcomputeRowStatsFBM
Compute counts-per-million (CPM) for CLAMP pipelinescpmCLAMP
Compute CPM on a file-backed matrix for CLAMP (in-place)cpmCLAMPFBM
Cross-product Z^T Y with FBM or dense matricescross_ZY
Cross-validation AUC for CLAMP latent variables and pathwayscrossVal
Whole-blood reference expression matrixdataWholeBlood
Differential latent-variable activity between sample groupsdifferentialLVActivity
Filter rows of a Filebacked Big Matrix based on mean and variancefilterFBM
Find the location of the maximum of a smoothing splinefindSplineMax
Count number of latent variables exceeding AUC thresholdsgetAUCstats
Compute Chat matrix from prior annotationgetChat
Download and read a GMT file from a URLgetGMT
Subset and filter pathway matrix to match target genesgetMatchedPathwayMat
Subset and filter multiple pathway matrices to match target genesgetMatchedPathwayMat2
Subset and filter multiple pathway matrices to match target genesgetMatchedPathwayMatList
Subset and filter pathway matrix to match target genesgetMatchedPathwayMatOld
Get maximum AUC per latent variablegetMaxAUC
Estimate noise scale from singular values with linear tail extrapolationgetScaleFromSVs
Convert a list of GMT gene sets to a sparse matrixgmtListToSparseMat
Major cell-type annotationsmajorCellTypes
Matrix multiplication with support for FBM objectsmat_mult
Greedy maximum correspondence from correlation matrixmax_correspondence_greedy
Print a concatenated messagemymessage
Estimate number of principal components via elbow or permutation methodnum.pc
One-to-one masking of maximum associationsoneToOneMask
panDB gene-set databasepanDB
Ridge-regularized pseudoinverse via SVDpinv.ridge
ComplexHeatmap visualization of top genes by latent variableplotTopZ_Complex
Preprocess an expression matrix for CLAMPpreprocessCLAMP
Preprocess a bigstatsr FBM for CLAMPpreprocessCLAMPFBM
Project new data into CLAMP latent spaceprojectCLAMP
Read a GMT file into a listread_gmt
Ridge regression update for Bridge_B
Rotate SVD components to make dominant directions positiverotateSVD
Row-wise correlation between two matricesrow_cor
Run elbow method to estimate number of PCsrun_elbow
Run permutation method to estimate number of PCsrun_permutation
Select default number of CLAMP latent variables from an SVDselect_clamp_k
Select default number of components for a CLAMP solver SVDselect_svd_k
Fit the loading matrix Z using sparse regression of prior information UsolveU
Squash extreme z-scoressquashZscore
Row-wise scaling (mean 0, sd 1)tscale
Winsorize matrix columns by capping the top-k valueswinsor_topk
xCell cell-signature matrixxCell
Z-score a filtered expression matrix for CLAMPzscoreCLAMP
Z-score a filtered FBM in-placezscoreCLAMPFBM