View source: R/pipeline_functions.R
funcEnrich.GSEA | R Documentation |
funcEnrich.GSEA
performs gene set enrichment analysis to the input gene list, by using the GSEA Test.
funcEnrich.GSEA(
rank_profile = NULL,
use_gs = NULL,
gs2gene = NULL,
min_gs_size = 5,
max_gs_size = 500,
Pv_adj = "fdr",
Pv_thre = 0.1,
test_strategy = "GSEA",
nperm = 1000,
use_seed = 999
)
rank_profile |
a named vector of numerics, the differential values (DE or DA) calculated from a sample comparison (e.g. "G4 vs. Others"). Names of the vector must be gene names. For the DA, user could use 'processDriverProfile()' to convert the DA profile into gene-name based profile. The differential values can be "logFC" or "t-statistics". |
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. |
test_strategy |
choose from "KS" and "GSEA". Default is "GSEA". If "KS", will perform a Kolmogorov-Smirnov test to get the significance value. |
nperm |
numeric, number of random permutations. Default is 1000. This function only do gene-label based permutation reshuffling. |
use_seed |
integer, the random seed. Default is 999. |
Return a data.frame, contains gene sets with significant enrichment statistics. Column details are as follows (test_strategy=GSEA),
#Name |
Name of the enriched gene set |
Total_item |
Size in the profile |
Num_item |
Number of genes in the gene set (filtered by the profile list) |
Ori_P |
Original P-value from GSEA Test |
Adj_P |
Adjusted P-value |
ES |
Enrichment Score |
NES |
normalized Enrichment Score |
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
## get significant gene set by driver's DA profile
DA_profile <- processDriverProfile(Driver_name=ms_tab$gene_label,
Driver_profile=ms_tab$logFC.G4.Vs.others_DA,
choose_strategy='absmax',
return_type ='gene_statistics')
res1 <- funcEnrich.GSEA(rank_profile=DA_profile,
use_gs=c('H'),
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.