View source: R/pipeline_functions.R
funcEnrich.Fisher | R Documentation |
funcEnrich.Fisher
performs gene set enrichment analysis to the input gene list, by using the Fisher's Exact Test.
Background gene list is accepeted.
funcEnrich.Fisher(
input_list = NULL,
bg_list = NULL,
use_gs = NULL,
gs2gene = NULL,
min_gs_size = 5,
max_gs_size = 500,
Pv_adj = "fdr",
Pv_thre = 0.1
)
input_list |
a vector of characters, a vector of gene symbols. If gene symbols are not available, users can call |
bg_list |
a vector of characters, a vector of background gene symbols. If NULL, genes in |
use_gs |
a vector of characters, the names of gene sets.
If |
gs2gene |
list, a list contains elements of gene sets.
The name of the element is gene set, each element contains a vector of genes in that gene set.
If NULL, will use |
min_gs_size |
numeric, the minimum size of gene set to analysis. Default is 5. |
max_gs_size |
numeric, the maximum size of gene set to analysis. Default is 500. |
Pv_adj |
character, method to adjust P-value. Default is "fdr".
For details, please check |
Pv_thre |
numeric, threshold for the adjusted P-values. Default is 0.1. |
Return a data.frame, contains gene sets with significant enrichment statistics. Column details are as follows,
#Name |
Name of the enriched gene set |
Total_item |
Background size |
Num_item |
Number of genes in the gene set (filtered by the background list) |
Num_list |
Number of input genes for testing (filtered by the background list) |
Num_list_item |
Number of input genes annotated by the gene set (filtered by the background list) |
Ori_P |
Original P-value from Fisher's Exact Test |
Adj_P |
Adjusted P-value |
Odds_Ratio |
Odds ratio from the 2*2 matrix used for Fisher's Exact Test |
Intersected_items |
A vector of the intersected genes, collapsed by ';'. Number is equal to Num_list_item |
analysis.par <- list()
analysis.par$out.dir.DATA <- system.file('demo1','driver/DATA/',package = "NetBID2")
NetBID.loadRData(analysis.par=analysis.par,step='ms-tab')
ms_tab <- analysis.par$final_ms_tab
sig_driver <- draw.volcanoPlot(dat=ms_tab,label_col='gene_label',
logFC_col='logFC.G4.Vs.others_DA',
Pv_col='P.Value.G4.Vs.others_DA',
logFC_thre=0.4,
Pv_thre=1e-7,
main='Volcano Plot for G4.Vs.others_DA',
show_label=FALSE,
label_type = 'origin',
label_cex = 0.5)
gs.preload(use_spe='Homo sapiens',update=FALSE)
res1 <- funcEnrich.Fisher(input_list=ms_tab[rownames(sig_driver),'geneSymbol'],
bg_list=ms_tab[,'geneSymbol'],
use_gs=c('H','C5'),
Pv_thre=0.1,Pv_adj = 'none')
## Not run:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.