find_enriched_pathway {KEGGprofile} | R Documentation |
The function will map the genes in KEGG pathway database, and then hypergegeometric tests would be used to estimate the significance of enrichment for each pathway
find_enriched_pathway(gene, species = "hsa", returned_pvalue = 0.01, returned_adjpvalue = 0.05, returned_genenumber = 5, download_latest = FALSE, refGene = NULL)
gene |
a numeric matrix |
species |
the species id in KEGG database, 'hsa' means human, 'mmu' means mouse, 'rno' means rat, etc |
returned_pvalue |
the minimum p value for enriched pathways |
returned_adjpvalue |
the minimum adjusted p value for enriched pathways |
returned_genenumber |
the minimum number of annotated genes for enriched pathways |
download_latest |
logical. Indicate if the function will download the latest pathway/gene link from KEGG website. As the KEGG.db package was not updated for a long time due to the KEGG policy change, we provided this parameter so that the users could get the latest KEGG database. |
refGene |
the names of genes used as reference. If not provided, all genes in KEGG database will be used. |
Only the pathways with p value <= returned_pvalue in hypergegeometric tests and number of annotated genes >= returned_genenumber would be taken as enriched and returned.
a list with two parts
name stastic |
description a matirx containing the pathway IDs of enriched pathways, and their names, p values, number of annotated genes |
name detail |
description a list with the genes annotated for each pathway |
data(pho_sites_count) #the 300 genes with most phospholation sites quantified genes<-names(rev(sort(pho_sites_count[,1]))[1:300]) pho_KEGGresult<-find_enriched_pathway(genes,species='hsa')