fisher_exact_test: fisher_exact_test

Description Usage Arguments Value Examples

View source: R/supplementary_functions.R

Description

This function allows you to compute two sided fish exact pvalue of gene list for selected pathways To know more about this method. I recommend you to read the paper (Enrichment or depletion of a GO category within a class of genes: which test?) for more details

Usage

1
2
fisher_exact_test(selected_pathways, gene_input,
  gene_pathway_matrix = NULL)

Arguments

selected_pathways

A vecor of pathways to be used for enrichment analysis for genes in gene_input. It should have same ID types(E.g. pathway ID, pathway names) as the pathways in gene_pathway_matrix.

gene_input

A vecor of genes to be annotated. It should have same ID types(E.g. Ensembl ID, HUGO gene symbol) as the genes in gene_pathway_matrix.

gene_pathway_matrix

A binary background matrix whose columns are the pathways/gene sets and whose rows are all the genes from pathways/gene sets . It could be in sparse matrix format ((inherit from class "sparseMatrix" as in package Matrix) to save memory. For gene i and pathway j, the value of matrix(i,j) is 1 is gene i belonging to pathway j otherwise 0. Users could leave it as default value then it will use pre-collected gene_pathway_matrix from GO Ontology and REACTOME databaase. Otherwise, they could use their own customized gene_pathway_matrix

Value

A list of two elements:

Examples

1
2
3
4
fetRes <- fisher_exact_test(selected_pathways=c("GO:0007250","GO:0008625"),
  gene_input=c("TRPC4AP","CDC37","TNIP1","IKBKB","NKIRAS2","NFKBIA","TIMM50",
     "RELB","TNFAIP3","NFKBIB","HSPA1A","NFKBIE","SPAG9","NFKB2","ERLIN1",
     "REL","TNIP2","TUBB6","MAP3K8"),gene_pathway_matrix=NULL)

TaoDFang/GENEMABR documentation built on July 28, 2019, 3:16 p.m.