The dNdScv R package is a suite of maximum-likelihood dN/dS methods designed to quantify selection in cancer and somatic evolution (Martincorena et al., 2017). The package contains functions to quantify dN/dS ratios for missense, nonsense and essential splice mutations, at the level of individual genes, groups of genes or at whole-genome level. The dNdScv method was designed to detect cancer driver genes (i.e. genes under positive selection in cancer) on datasets ranging from a few samples to thousands of samples, in whole-exome/genome or targeted sequencing studies.

The background mutation rate of each gene is estimated by combining local information (synonymous mutations in the gene) and global information (variation of the mutation rate across genes, exploiting epigenomic covariates), and controlling for the sequence composition of the gene and mutational signatures. Unlike traditional implementations of dN/dS, dNdScv uses trinucleotide context-dependent substitution matrices to avoid common mutation biases affecting dN/dS (Greenman et al., 2006).

Download and Installation


The software is available for download on GitHub: https://github.com/im3sanger/dndscv


You can use devtools::install_github() to install the dndscv package directly from R:

> library(devtools); install_github("im3sanger/dndscv")

Learn and Support

For a tutorial on dNdScv see the vignette included with the package. This includes examples for whole-exome/genome data and for targeted data.

Tutorial: getting started with dNdScv

License and Citation

When using the software, please cite:

Martincorena I, et al. (2017) Universal Patterns of Selection in Cancer and Somatic Tissues. Cell. http://www.cell.com/cell/fulltext/S0092-8674(17)31136-4


Please contact Inigo Martincorena: inigo.martincorena@sanger.ac.uk


Sanger Contributors

Campbell, Peter

Campbell, Peter
Peter Campbell
Head of Cancer, Ageing and Somatic Mutation, and Senior Group Leader

Related Programmes


  • Universal Patterns of Selection in Cancer and Somatic Tissues.

    Martincorena I, Raine KM, Gerstung M, Dawson KJ, Haase K et al.

    Cell 2017