pathEnrich {diffEnrich} | R Documentation |
This function takes the list generated in get_kegg
as well as a vector
of NCBI (ENTREZ) geneIDs, and identifies significantly enriched KEGG pathways using
a Fisher's Exact Test. Unadjusted p-values as well as FDR corrected p-values are
calculated.
pathEnrich(gk_obj, gene_list, method = "BH", cutoff = 0.05, N = 2)
## S3 method for class 'pathEnrich'
print(x, ...)
## S3 method for class 'pathEnrich'
summary(object, ...)
gk_obj |
list. Object genrated from |
gene_list |
Vector. Vector of NCBI (ENTREZ) geneIDs. |
method |
Character. Character string telling |
cutoff |
Numeric. The p-value threshold to be used as the cutoff when determining statistical significance, and used to filter list of significant pathways. |
N |
Numeric. The number of genes from the gene list that must be present in a KEGG pathway in order for that pathway to be retained and tested. |
x |
object of class |
... |
Unused |
object |
object of class |
This function may not always use the complete list of genes provided by the user.
Specifically, it will only use the genes from the list provided that are also in
the most current species list pulled from the KEGG REST API, or from the older data KEGG
loaded by the user. The 'cutoff' only filters the list of pathways provided in the 'sig_paths'
list item. It is not used to filter the 'enrich_table' list object. S3 generic functions for print
and summary
are
provided. The print
function prints the results table as a tibble
, and the
summary
function returns the number of pathways that reached statistical significance,
as well as their descriptions, the number of genes used from the KEGG data base, the KEGG species, and the
method used for multiple testing correction, and the p-value cutoff required for reaching statistical significance.
A list object of class pathEnrich
that contains 6 items:
The species used in enrichment
The method used to correct for multiple testing
The KEGG pathways the reached statistical significance after multiple testing correction.
The p-value threshold to be used as the cutoff when determining statistical significance, and used to filter final results data set.
The number of genes from the gene list that must be present in a KEGG pathway in order for that pathway to be retained and tested.
A data frame that summarizes the results of the pathway analysis and contains the following variables:
KEGG Pathway Identifier
Description of KEGG Pathway (provided by KEGG)
Number of Genes in KEGG Pathway
Number of Genes from gene list in KEGG Pathway
Number of Genes in KEGG Database
Number of Genes from gene list in KEGG Database
Expected number of genes from list to be in KEGG pathway by chance (i.e., not enriched)
P-value for enrichment of list genes related to KEGG pathway
False Discovery Rate (Benjamini and Hochberg) to account for multiple testing across KEGG pathways
KEGG_PATHWAY_in_list/expected
list1_pe <- pathEnrich(gk_obj = kegg, gene_list = geneLists$list1)
## Not run:
list2_pe <- pathEnrich(gk_obj = kegg, gene_list = geneLists$list2, method = 'none', N = 4)
## End(Not run)