Skip to content

sva

Bioc current

Surrogate Variable Analysis

v3.60.0 · software · Artistic-2.0

Release Lineage

Entered 2.9 · Nov 1, 2011

Current · Requires R 4.6

1.0 In 30 of 49 releases 3.23

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.

Loading 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

R 1,793 (50.2%)C/C++/src 40 (1.1%)Tests 371 (10.4%)Docs 886 (24.8%)Vignettes 479 (13.4%)

API

Exported functions

17

Internal functions

18

Recent export changes

v3.8+1 sva_network
v3.5+2 qsva, read.degradation.matrix

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

v2.9: 1,203 LOCv2.10: 1,203 LOCv2.11: 1,203 LOCv2.12: 1,203 LOCv2.13: 1,203 LOCv2.14: 1,539 LOCv3.0: 1,874 LOCv3.1: 1,957 LOCv3.2: 1,991 LOCv3.3: 1,991 LOCv3.4: 1,991 LOCv3.5: 3,019 LOCv3.6: 3,019 LOCv3.7: 3,019 LOCv3.8: 3,089 LOCv3.9: 3,089 LOCv3.10: 3,089 LOCv3.11: 3,569 LOCv3.12: 3,569 LOCv3.13: 3,569 LOCv3.14: 3,569 LOCv3.15: 3,569 LOCv3.16: 3,569 LOCv3.17: 3,569 LOCv3.18: 3,569 LOCv3.19: 3,569 LOCv3.20: 3,569 LOCv3.21: 3,569 LOCv3.22: 3,569 LOCv3.23: 3,569 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/bioc-code-metrics.

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSNoCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
97%
Return-value docs
100%
References docs
6%

Topics

Depended on by (81)

CRAN (16)

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for sva version 3.60.0 [Data set]. HJJB, LLC. Data release v2026-08-18. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy