An introduction to DISCOVER

Introduction

DISCOVER is a novel statistical test for detecting co-occurrence and mutual exclusivity in cancer genomics data. Unlike traditional approaches used for these tasks such as Fisher's exact test, DISCOVER is based on a null model that takes into account the overall tumour-specific alteration rates when deciding whether alterations co-occur more or less often than expected by chance. This improved null model prevents spurious associations in co-occurrence detection, and increases the statistical power to detect mutual exclusivities.

This vignette introduces the DISCOVER R package for mutual exclusivity and co-occurrence analysis. Two variants of the DISCOVER test are implemented by this package. The first variant tests pairs of genes for either co-occurrence or mutual exclusivity. The second is a mutual exclusivity test for gene sets larger than two. We will illustrate the use of both tests by performing a mutual exclusivity and co-occurrence analysis of somatic mutations in the TCGA breast cancer samples.

Set up

First, we load the package and the breast cancer mutation data.

library(discover)
## Loading required package: matrixStats
## matrixStats v0.10.3 (2014-10-01) successfully loaded. See ?matrixStats for help.
data("BRCA.mut")

A small fragment of the mutation matrix is shown below. It takes the form of a binary matrix, i.e. only 0 and 1 are allowed as values.

BRCA.mut[1:5, 1:5]
##        TCGA-A1-A0SB-01A-11D-A142-09 TCGA-A1-A0SD-01A-11D-A10Y-09
## A1CF                              0                            0
## A2M                               0                            0
## A2ML1                             0                            0
## A4GALT                            0                            0
## A4GNT                             0                            0
##        TCGA-A1-A0SE-01A-11D-A099-09 TCGA-A1-A0SF-01A-11D-A142-09
## A1CF                              0                            0
## A2M                               0                            0
## A2ML1                             0                            0
## A4GALT                            0                            0
## A4GNT                             0                            0
##        TCGA-A1-A0SG-01A-11D-A142-09
## A1CF                              0
## A2M                               0
## A2ML1                             0
## A4GALT                            0
## A4GNT                             0

An important ingredient of the DISCOVER test is the estimation of a background matrix. This is how tumour-specific alteration rates can be used by the test. To estimate this background matrix, a discover.matrix object is created and passed the mutation matrix. Depending on the size of the matrix this might take some time. This estimation step only needs to be performed once.

events <- discover.matrix(BRCA.mut)

Note that for estimating this background matrix, it is important that the full mutation matrix is provided. Even if only a subset of genes will subsequently be used in the analysis, a whole-genome view of the mutations is required for this first step. Indeed, for this example we will only look for mutual exclusivity between genes that are mutated in at least 25 tumours.

subset <- rowSums(BRCA.mut) > 25

Pairwise tests

We can now test for mutual exclusivity between all pairs of genes using the pairwise.discover.test function. Its only required argument is an instance of the discover.matrix class like we created above. In order to only analyse frequently mutated genes, we select the corresponding rows before passing the matrix to the function. Again, depending on the size of the matrix, this function might take some time.

result.mutex <- pairwise.discover.test(events[subset, ])

We can get a quick overview of the results of this analysis simply by printing the result object.

result.mutex
## Pairwise DISCOVER mutual exclusivity test
## alternative hypothesis: observed overlap is less than expected by chance
## 
## number of pairs tested: 3403
## proportion of true null hypotheses: 0.9289581
## number of significant pairs at a maximum FDR of 0.01 : 24

The print method for the pairwise.discover.out class optionally takes an argument with which the false discovery rate (FDR) threshold is selected. By default, a maximum FDR of 1% is used. Below, we get a summary of the test results using a somewhat more liberal threshold of 5%.

print(result.mutex, fdr.threshold=0.05)
## Pairwise DISCOVER mutual exclusivity test
## alternative hypothesis: observed overlap is less than expected by chance
## 
## number of pairs tested: 3403
## proportion of true null hypotheses: 0.9289581
## number of significant pairs at a maximum FDR of 0.05 : 24

To get the pairs of genes which are significantly mutually exclusive, we can use the as.data.frame method. This method, too, takes an optional FDR threshold as argument. Below, we use the default of 1%.

as.data.frame(result.mutex)
##     gene1  gene2      p.value      q.value
## 5    TP53   CDH1 6.351232e-17 5.110657e-16
## 14   TP53  GATA3 5.470853e-15 3.138091e-14
## 21   TP53 MAP3K1 1.206990e-10 8.509571e-10
## 24   TP53 PIK3CA 1.224574e-10 8.509571e-10
## 12 PIK3CA  GATA3 1.149756e-06 2.737997e-05
## 3   GATA3   CDH1 1.013596e-05 2.693334e-04
## 19  NCOR1 MAP3K1 1.527656e-05 3.835704e-04
## 22    TTN MAP3K1 4.145479e-05 1.111636e-03
## 17   TP53 MAP2K4 4.315436e-05 1.111636e-03
## 11   MUC4  GATA3 6.633622e-05 1.711979e-03
## 13  SYNE1  GATA3 9.833463e-05 2.462251e-03
## 9  MAP3K1  GATA3 1.278241e-04 3.089064e-03
## 7  MAP3K1    DMD 1.392109e-04 3.208018e-03
## 1    TP53 ARID1A 1.707205e-04 3.720344e-03
## 15    TTN  GATA3 1.943778e-04 4.005470e-03
## 4  MAP3K1   CDH1 1.953732e-04 4.005470e-03
## 23  MUC5B   MUC4 2.043576e-04 4.048252e-03
## 2    FAT3   CDH1 2.367697e-04 4.229155e-03
## 16  XIRP2  GATA3 2.429507e-04 4.229155e-03
## 20    NEB MAP3K1 2.431836e-04 4.229155e-03
## 8  PIK3CA   FAT3 3.152121e-04 5.572579e-03
## 10  MUC16  GATA3 4.622525e-04 8.737314e-03
## 18  MUC16 MAP3K1 4.783092e-04 8.737314e-03
## 6  MAP3K1  CSMD1 5.207140e-04 9.568220e-03

Groupwise test

In the above results, we can identify a set of four genes—TP53, CDH1, GATA3, and MAP3K1—for which all pairwise combinations are found mutually exclusive. We can use the groupwise.discover.test to asses whether this set of genes is also mutually exclusive as a group. This we can do by simply passing the subset of the discover.matrix that corresponds to the given genes.

genes <- c("TP53", "CDH1", "GATA3", "MAP3K1")
groupwise.discover.test(events[genes, ])
## Groupwise DISCOVER mutual exclusivity test
## 
## method: impurity
## P = 7.819955e-22
plot(events[genes, ])

plot of chunk unnamed-chunk-10

Session info

sessionInfo()
## R version 3.2.1 (2015-06-18)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu precise (12.04.2 LTS)
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=C              
##  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
##  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
##  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
## [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] discover_0.9-1     matrixStats_0.10.3
## 
## loaded via a namespace (and not attached):
## [1] formatR_1.0       tools_3.2.1       R.methodsS3_1.6.1 knitr_1.11       
## [5] stringr_0.6.2     evaluate_0.8