Skip to content
dN/dS methods to quantify selection in cancer and somatic evolution
Branch: master
Clone or download
Latest commit c9fa29a Oct 17, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Estimation global dN/dS at known hotspots (sitednds and codondnds) Aug 23, 2019
data Estimation global dN/dS at known hotspots (sitednds and codondnds) Aug 23, 2019
inst Compatibility with tibble Apr 4, 2019
man Expanding sitednds to include non-synonymous muts from passenger genes Jul 12, 2019
vignettes Handling gene lists of length 1 in sitednds May 3, 2019
DESCRIPTION Updating description Oct 17, 2019
NAMESPACE Adopting gene_list in sitednds and codondnds for RHT Jul 4, 2019 Updating description Oct 9, 2019



The dNdScv R package is a group 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.

Although initially designed for cancer genomic studies, dNdScv can also be used to quantify selection in other resequencing studies, such as SNP analyses, mutation accumulation studies in bacteria or for the discovery of mutations causing developmental disorders using data from human trios.

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).


The latest version of this package includes support for other human genome assemblies and other species.


You can use devtools::install_github() to install dndscv from this repository:

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


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

By default, dNdScv assumes that mutation data is mapped to the GRCh37/hg19 assembly of the human genome. Users interested in trying dNdScv on a different set of transcripts, a different assembly or a different species can follow this tutorial.


Martincorena I, et al. (2017) Universal Patterns of Selection in Cancer and Somatic Tissues. Cell.


Moritz Gerstung and Peter Campbell.

Federico Abascal for extensive testing, feedback and ideas.

You can’t perform that action at this time.