get_overlap_matix | R Documentation |
This function creates a matrix of the ratio of overlapping genesets. It takes a list of genes or alternatively 2 gene lists
get_overlap_matix(l1, l2 = NULL)
l1 |
gene list |
l2 |
optional 2nd gene list |
top diagonal matrix of overlap ratios
## Not run:
# returns a self (l1 vs l1) overlap matrix
genes <- paste0('gene', seq(1, 100))
set.seed(42)
n_genes_to_sample <- rnbinom(10, 10, .5)
l1 <- lapply(seq_along(n_genes_to_sample), function(i){
n <- n_genes_to_sample[i]
sample(genes, n)
}) %>%
setNames(., paste0('L1_', LETTERS[1:10]))
omat <- get_overlap_matix(l1)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.