sva
Bioc currentSurrogate Variable Analysis
Release Lineage
Entered 2.9 · Nov 1, 2011
Current · Requires R 4.6
Description
The sva package contains functions for removing batch effects and other unwanted variation in high-throughput experiment. Specifically, the sva package contains functions for the identifying and building surrogate variables for high-dimensional data sets. Surrogate variables are covariates constructed directly from high-dimensional data (like gene expression/RNA sequencing/methylation/brain imaging data) that can be used in subsequent analyses to adjust for unknown, unmodeled, or latent sources of noise. The sva package can be used to remove artifacts in three ways: (1) identifying and estimating surrogate variables for unknown sources of variation in high-throughput experiments (Leek and Storey 2007 PLoS Genetics,2008 PNAS), (2) directly removing known batch effects using ComBat (Johnson et al. 2007 Biostatistics) and (3) removing batch effects with known control probes (Leek 2014 biorXiv). Removing batch effects and using surrogate variables in differential expression analysis have been shown to reduce dependence, stabilize error rate estimates, and improve reproducibility, see (Leek and Storey 2007 PLoS Genetics, 2008 PNAS or Leek et al. 2011 Nat. Reviews Genetics).
Test coverage
Line coverage
–
Expression
–
Tests / Examples
–
Functions
38 17 exported
Complexity
4.9 avg / 36 max
Call network
38 nodes / 28 edges
Test coverage is not measured for Bioconductor packages; nodes fall back to a neutral fill.
Call graph
Open call graph →Lowest coverage
Per-function coverage is not measured for this package yet.
Code
Structure
Lines of code
3,569
Files
63
Compiled share
1.1%
Has compiled src
Yes
Language breakdown
API
Exported functions
17
Internal functions
18
Recent export changes
Testing & CI
Has tests
Yes
Test-to-code ratio
0.21
testthat edition
–
CI present
No
CI type
[]
PR gated
No
Docs
Roxygen coverage
100%
Health & Security signals
Informational signals; not verdicts.
on.exit coverage
100%
Unsafe pattern score
0
Dep constraint coverage
0%
Secret pattern count
0
Bundled 3rd-party code
2 items
Portability & License
Min R version
3.2
System requirements
–
C++ standard
–
License
Artistic-2.0
License flags
SPDX valid, OSI approved
History
Versions
30
First release
2012-03-10
Latest release
2026-04-28
Avg cadence
182 days
Cold removal rate
–
Dep drift
13
LOC over versions
Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/bioc-code-metrics.
Documentation
- Examples that run
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- References docs
- 6%
Topics
Depended on by (81)
Bioconductor (65)
People
Jeffrey T. Leek
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("sva")Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-08-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.