NKI-CCB / DISCOVER

DISCOVER co-occurrence and mutual exclusivity analysis for cancer genomics data
Apache License 2.0
27 stars 6 forks source link

mutual exclusivity against one gene of interest #2

Closed vdhankani closed 6 years ago

vdhankani commented 6 years ago

Hello,

Using the R implementation of discover, is there a way to evaluate mutual exclusivity of all ~20000k genes against 1 specific gene of interest, instead of doing pairwise across all genes?

Thanks Varsha

scanisius commented 6 years ago

Yes, there is a way to do this in DISCOVER. The pairwise.discover.test function takes a second argument, which allows you to assign genes to groups. Pairwise tests will then only be performed for genes in different groups, and not for genes in the same group. Your question is a special case of this, where one group consists of just one gene, and another group contains the rest of the genes. The code example below illustrates this using the breast cancer mutation data included in the DISCOVER package. In the example, I only test for mutual exclusivities involving TP53.

library(discover)

data(BRCA.mut)

events <- discover.matrix(BRCA.mut)
subset <- rowSums(BRCA.mut) > 20

# gene.groups is a grouping vector that is 1 in the entry corresponding to TP53, and 2 for all other genes
gene.groups <- ifelse(rownames(events) == "TP53", 1, 2)

result <- pairwise.discover.test(events[subset, ], gene.groups[subset])
vdhankani commented 6 years ago

I'm getting the following 2 error/warning messages when calling the discover.matrix function

  1. ABNORMAL_TERMINATION_IN_LNSRCH

    Line search cannot locate an adequate point after 20 function and gradient evaluations. Previous x, f and g restored. Possible causes: 1 error in function or gradient evaluation; 2 rounding error dominate computation.

  2. Warning: more than 10 function and gradient evaluations in the last line search. Termination may possibly be caused by a bad search direction.

I'm guessing the results are not to be trusted in these cases. What would the authors suggest? Is there a documentation explaining all the possible errors and their causes?