get_overlap_matix: Creates matrix of overlap ratios

get_overlap_matixR Documentation

Creates matrix of overlap ratios

Description

This function creates a matrix of the ratio of overlapping genesets. It takes a list of genes or alternatively 2 gene lists

Usage

get_overlap_matix(l1, l2 = NULL)

Arguments

l1

gene list

l2

optional 2nd gene list

Value

top diagonal matrix of overlap ratios

Examples

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


lefeverde/lefutils documentation built on Sept. 18, 2024, 7:30 a.m.