calc_hyper: Perform hypergeometric test

View source: R/calc_hyper.R

calc_hyperR Documentation

Perform hypergeometric test

Description

Use one-tailed hypergeometric test to calculate overlap enrichment between proteomic data and other datasets (e.g. InWeb, gene lists, etc.)

Usage

calc_hyper(df, listDf, intersectDf = data.frame(intersectN = T), bait = NULL)

Arguments

df

data.frame containing proteomic data, with gene and significant columns

listDf

data.frame containing data to overlap, with listName, gene and significant columns

intersectDf

data.frame contaning listName and intersectN columns intersectN = vector of boolean variables indicating if total population should be intersect of the two datasets

bait

name of bait protein

Value

list of data.frame and list. Data.frame contains list_name, successInSample_count (x), sample_count (n), notSample_count (N-n), success_count (k), population_count (N), pvalue. List of lists (for each listName) contains genes names corresponding to each group (successInSample_genes, sample_genes, notSample_genes, success_genes, population_genes).

Examples

## Not run: 
data("example_data")
inwebDf <- get_inweb_list('BCL2')
inwebDf$listName <- 'list1'
intersectDf <- data.frame(listName='list1', intersectN = T)
calc_hyper(example_data, inwebDf, intersectDf, 'BCL2')

## End(Not run)

lagelab/Genoppi documentation built on Oct. 13, 2022, 2:36 p.m.