| Type: | Package |
| Title: | Gene Set Analysis Toolkit WebGestaltR |
| Version: | 1.0.0 |
| Date: | 2026-07-29 |
| Description: | The web version WebGestalt https://www.webgestalt.org supports 12 organisms, 354 gene identifiers and 321,251 function categories. Users can upload the data and functional categories with their own gene identifiers. In addition to the Over-Representation Analysis, WebGestalt also supports Gene Set Enrichment Analysis and Network Topology Analysis. The user-friendly output report allows interactive and efficient exploration of enrichment results. The WebGestaltR package not only supports all above functions but also can be integrated into other pipeline or simultaneously analyze multiple gene lists. |
| License: | LGPL-2 | LGPL-2.1 | LGPL-3 [expanded from: LGPL] |
| URL: | https://github.com/bzhanglab/WebGestaltR, https://bzhanglab.github.io/WebGestaltR/ |
| LazyLoad: | yes |
| Depends: | R (≥ 4.0) |
| Imports: | methods, dplyr, doRNG, readr, parallel (≥ 3.3.2), doParallel (≥ 1.0.10), foreach (≥ 1.4.0), jsonlite, httr, rlang, svglite, whisker, apcluster, Rcpp, cluster, poolr |
| NeedsCompilation: | yes |
| LinkingTo: | Rcpp |
| RoxygenNote: | 7.3.2 |
| SystemRequirements: | Cargo (Rust's package manager), rustc v1.63.0+ |
| Config/rextendr/version: | 0.4.2 |
| Config/WebGestaltR/MSRV: | 1.63.0 |
| Encoding: | UTF-8 |
| Suggests: | knitr, rmarkdown |
| VignetteBuilder: | knitr |
| Packaged: | 2026-07-30 14:22:33 UTC; shiz |
| Author: | John Elizarraras [aut], Jing Wang [aut], Yuxing Liao [aut], Eric Jaehnig [ctb], Zhiao Shi [aut, cre], Quanhu Sheng [ctb] |
| Maintainer: | Zhiao Shi <zhiao.shi@gmail.com> |
| Repository: | CRAN |
| Date/Publication: | 2026-07-30 23:20:22 UTC |
WebGestaltR: The R interface for enrichment analysis with WebGestalt.
Description
The web version WebGestalt https://www.webgestalt.org supports 12 organisms, 354 gene identifiers and 321,251 function categories. Users can upload the data and functional categories with their own gene identifiers. In addition to the Over-Representation Analysis, WebGestalt also supports Gene Set Enrichment Analysis and Network Topology Analysis. The user-friendly output report allows interactive and efficient exploration of enrichment results. The WebGestaltR package not only supports all above functions but also can be integrated into other pipeline or simultaneously analyze multiple gene lists.
Main function for enrichment analysis
Usage
WebGestaltR(
enrichMethod = "ORA",
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
interestGeneFile = NULL,
interestGene = NULL,
interestGeneType = NULL,
interestGeneNames = NULL,
collapseMethod = "mean",
referenceGeneFile = NULL,
referenceGene = NULL,
referenceGeneType = NULL,
referenceSet = NULL,
minNum = 10,
maxNum = 500,
sigMethod = "fdr",
fdrMethod = "BH",
fdrThr = 0.05,
topThr = 10,
reportNum = 20,
perNum = 1000,
gseaP = 1,
isOutput = TRUE,
outputDirectory = getwd(),
projectName = NULL,
dagColor = "continuous",
saveRawGseaResult = FALSE,
gseaPlotFormat = c("png", "svg"),
setCoverNum = 10,
networkConstructionMethod = NULL,
neighborNum = 10,
highlightType = "Seeds",
highlightSeedNum = 10,
nThreads = 1,
cache = NULL,
hostName = "https://www.webgestalt.org/",
useWeightedSetCover = FALSE,
useAffinityPropagation = FALSE,
usekMedoid = TRUE,
kMedoid_k = 25,
listName = NULL,
...
)
WebGestaltRBatch(
interestGeneFolder = NULL,
enrichMethod = "ORA",
isParallel = FALSE,
nThreads = 3,
...
)
Arguments
enrichMethod |
Enrichment methods: |
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
enrichDatabase |
The functional categories for the enrichment analysis. Users can use
the function |
enrichDatabaseFile |
Users can provide one or more GMT files as the functional
category for enrichment analysis. The extension of the file should be |
enrichDatabaseType |
The ID type of the genes in the |
enrichDatabaseDescriptionFile |
Users can also provide description files for the custom
|
interestGeneFile |
If |
interestGene |
Users can also use an R object as the input. If |
interestGeneType |
The ID type of the interesting gene list. The supported ID types of
WebGestaltR for the selected organism can be found by the function |
interestGeneNames |
The names of the id lists for multiomics data. |
collapseMethod |
The method to collapse duplicate IDs with scores. |
referenceGeneFile |
For the ORA method, the users need to upload the reference gene
list. The extension of the |
referenceGene |
For the ORA method, users can also use an R object as the reference
gene list. |
referenceGeneType |
The ID type of the reference gene list. The supported ID types
of WebGestaltR for the selected organism can be found by the function |
referenceSet |
Users can directly select the reference set from existing platforms in
WebGestaltR and do not need to provide the reference set through |
minNum |
WebGestaltR will exclude the categories with the number of annotated genes
less than |
maxNum |
WebGestaltR will exclude the categories with the number of annotated genes
larger than |
sigMethod |
Two methods of significance are available in WebGestaltR: |
fdrMethod |
For the ORA method, WebGestaltR supports five FDR methods: |
fdrThr |
The significant threshold for the |
topThr |
The threshold for the |
reportNum |
The number of enriched categories visualized in the final report. The default
is |
perNum |
The number of permutations for the GSEA method. The default is |
gseaP |
The exponential scaling factor of the phenotype score. The default is |
isOutput |
If |
outputDirectory |
The output directory for the results. |
projectName |
The name of the project. If |
dagColor |
If |
saveRawGseaResult |
Whether the raw result from GSEA is saved as a RDS file, which can be
used for plotting. Defaults to
|
gseaPlotFormat |
The graphic format of GSEA enrichment plots. Either |
setCoverNum |
The number of expected gene sets after set cover to reduce redundancy.
It could get fewer sets if the coverage reaches 100%. The default is |
networkConstructionMethod |
Netowrk construction method for NTA. Either
|
neighborNum |
The number of neighbors to include in NTA Network Expansion method. |
highlightType |
The type of nodes to highlight in the NTA Network Expansion method,
either |
highlightSeedNum |
The number of top input seeds to highlight in NTA Network Retrieval & Prioritizaiton method. |
nThreads |
The number of cores to use for GSEA and set cover, and in batch function. |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
useWeightedSetCover |
Use weighted set cover for ORA. Defaults to |
useAffinityPropagation |
Use affinity propagation for ORA. Defaults to |
usekMedoid |
Use k-medoid for ORA. Defaults to |
kMedoid_k |
The number of clusters for k-medoid. Defaults to |
listName |
(optional) The names of the analyte list. Used to give the HTML title of the report. Defaults to |
... |
In batch function, passes parameters to WebGestaltR function. Also handles backward compatibility for some parameters in old versions. |
interestGeneFolder |
Run WebGestaltR for gene list files in the folder. |
isParallel |
If jobs are run parallelly in the batch. |
Details
WebGestaltR function can perform three enrichment analyses: ORA (Over-Representation Analysis) and GSEA (Gene Set Enrichment Analysis).and NTA (Network Topology Analysis). Based on the user-uploaded gene list or gene list with scores, WebGestaltR function will first map the gene list to the entrez gene ids and then summarize the gene list based on the GO (Gene Ontology) Slim. After performing the enrichment analysis, WebGestaltR function also returns a user-friendly HTML report containing GO Slim summary and the enrichment analysis result. If functional categories have DAG (directed acyclic graph) structure or genes in the functional categories have network structure, those relationship can also be visualized in the report.
Value
The WebGestaltR function returns a data frame containing the enrichment analysis
result and also outputs an user-friendly HTML report if isOutput is TRUE.
The columns in the data frame depend on the enrichMethod and they are the following:
- geneSet
ID of the gene set.
- description
Description of the gene set if available.
- link
Link to the data source.
- size
The number of genes in the set after filtering by
minNumandmaxNum.- overlap
The number of mapped input genes that are annotated in the gene set.
- expect
Expected number of input genes that are annotated in the gene set.
- enrichmentRatio
Enrichment ratio, overlap / expect.
- enrichmentScore
Enrichment score, the maximum running sum of scores for the ranked list.
- normalizedEnrichmentScore
Normalized enrichment score, normalized against the average enrichment score of all permutations.
- leadingEdgeNum
Number of genes/phosphosites in the leading edge.
- pValue
P-value from hypergeometric test for ORA. For GSEA, please refer to its original publication or online at https://docs.gsea-msigdb.org/#GSEA/GSEA_User_Guide/.
- FDR
Corrected P-value for mulilple testing with
fdrMethodfor ORA.- overlapId
The gene/phosphosite IDs of
overlapfor ORA (entrez gene IDs or phosphosite sequence).- leadingEdgeId
Genes/phosphosites in the leading edge in entrez gene ID or phosphosite sequence.
- userId
The gene/phosphosite IDs of
overlapfor ORA orleadingEdgeIdfor GSEA in User input IDs.- plotPath
Path of the GSEA enrichment plot.
- database
Name of the source database if multiple enrichment databases are given.
- goId
In NTA, like
geneSet, the enriched GO terms of genes in the returned subnetwork.- interestGene
In NTA, the gene IDs in the subnetwork with 0/1 annotations indicating if it is from user input.
The WebGestaltRBatch function returns a list of enrichment results.
Author(s)
Maintainer: John Elizarraras john.elizarraras@bcm.edu
Authors:
Jing Wang jingwang.uestc@gmail.com
Yuxing Liao yuxingliao@gmail.com
Other contributors:
Eric Jaehnig Eric.Jaehnig@bcm.edu [contributor]
Zhiao Shi Zhiao.Shi@bcm.edu [contributor]
Quanhu Sheng shengqh@gmail.com [contributor]
See Also
Useful links:
Examples
## Not run:
####### ORA example #########
geneFile <- system.file("extdata", "interestingGenes.txt", package = "WebGestaltR")
refFile <- system.file("extdata", "referenceGenes.txt", package = "WebGestaltR")
outputDirectory <- getwd()
enrichResult <- WebGestaltR(
enrichMethod = "ORA", organism = "hsapiens",
enrichDatabase = "pathway_KEGG", interestGeneFile = geneFile,
interestGeneType = "genesymbol", referenceGeneFile = refFile,
referenceGeneType = "genesymbol", isOutput = TRUE,
outputDirectory = outputDirectory, projectName = NULL
)
####### GSEA example #########
rankFile <- system.file("extdata", "GeneRankList.rnk", package = "WebGestaltR")
outputDirectory <- getwd()
enrichResult <- WebGestaltR(
enrichMethod = "GSEA", organism = "hsapiens",
enrichDatabase = "pathway_KEGG", interestGeneFile = rankFile,
interestGeneType = "genesymbol", sigMethod = "top", topThr = 10, minNum = 5,
outputDirectory = outputDirectory
)
####### NTA example #########
enrichResult <- WebGestaltR(
enrichMethod = "NTA", organism = "hsapiens",
enrichDatabase = "network_PPI_BIOGRID", interestGeneFile = geneFile,
interestGeneType = "genesymbol", sigMethod = "top", topThr = 10,
outputDirectory = getwd(), highlightSeedNum = 10,
networkConstructionMethod = "Network_Retrieval_Prioritization"
)
## End(Not run)
WebGestaltRMultiOmics
Description
Perform multi-omics analysis using WebGestaltR
Usage
WebGestaltRMultiOmics(
analyteLists = NULL,
analyteListFiles = NULL,
analyteTypes = NULL,
enrichMethod = "ORA",
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
collapseMethod = "mean",
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 100,
setCoverNum = 10,
perNum = 1000,
gseaP = 1,
isOutput = TRUE,
outputDirectory = getwd(),
projectName = NULL,
dagColor = "binary",
saveRawGseaResult = FALSE,
gseaPlotFormat = "png",
nThreads = 1,
cache = NULL,
hostName = "https://www.webgestalt.org/",
useWeightedSetCover = TRUE,
useAffinityPropagation = FALSE,
usekMedoid = FALSE,
kMedoid_k = 25,
isMetaAnalysis = TRUE,
mergeMethod = "mean",
normalizationMethod = "rank",
referenceLists = NULL,
referenceListFiles = NULL,
referenceTypes = NULL,
referenceSets = NULL,
listNames = NULL
)
Arguments
analyteLists |
|
analyteListFiles |
If |
analyteTypes |
a vector containing the ID types of the analyte lists. |
enrichMethod |
Enrichment methods: |
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
enrichDatabase |
The functional categories for the enrichment analysis. Users can use
the function |
enrichDatabaseFile |
Users can provide one or more GMT files as the functional
category for enrichment analysis. The extension of the file should be |
enrichDatabaseType |
The ID type of the genes in the |
enrichDatabaseDescriptionFile |
Users can also provide description files for the custom
|
collapseMethod |
The method to collapse duplicate IDs with scores. |
minNum |
WebGestaltR will exclude the categories with the number of annotated genes
less than |
maxNum |
WebGestaltR will exclude the categories with the number of annotated genes
larger than |
fdrMethod |
For the ORA method, WebGestaltR supports five FDR methods: |
sigMethod |
Two methods of significance are available in WebGestaltR: |
fdrThr |
The significant threshold for the |
topThr |
The threshold for the |
reportNum |
The number of enriched categories visualized in the final report. The default
is |
setCoverNum |
The number of expected gene sets after set cover to reduce redundancy.
It could get fewer sets if the coverage reaches 100%. The default is |
perNum |
The number of permutations for the GSEA method. The default is |
gseaP |
The exponential scaling factor of the phenotype score. The default is |
isOutput |
If |
outputDirectory |
The output directory for the results. |
projectName |
The name of the project. If |
dagColor |
If |
saveRawGseaResult |
Whether the raw result from GSEA is saved as a RDS file, which can be
used for plotting. Defaults to
|
gseaPlotFormat |
The graphic format of GSEA enrichment plots. Either |
nThreads |
The number of cores to use for GSEA and set cover, and in batch function. |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
useWeightedSetCover |
Use weighted set cover for ORA. Defaults to |
useAffinityPropagation |
Use affinity propagation for ORA. Defaults to |
usekMedoid |
Use k-medoid for ORA. Defaults to |
kMedoid_k |
The number of clusters for k-medoid. Defaults to |
isMetaAnalysis |
whether to perform meta-analysis. Defaults to |
mergeMethod |
The method to merge the results from multiple omics (options: |
normalizationMethod |
The method to normalize the results from multiple omics (options: |
referenceLists |
For the ORA method, users can also use an R object as the reference
gene list. |
referenceListFiles |
For the ORA method, the users need to upload the reference gene
list. The extension of the |
referenceTypes |
Vector of the ID types of the reference lists. The supported ID types
of WebGestaltR for the selected organism can be found by the function |
referenceSets |
Users can directly select the reference sets from existing platforms in
WebGestaltR and do not need to provide the reference set through |
listNames |
The names of the analyte lists. |
Multi-omics GSEA importFrom dplyr bind_rows left_join arrange select desc importFrom readr write_tsv
Description
Multi-omics GSEA importFrom dplyr bind_rows left_join arrange select desc importFrom readr write_tsv
Usage
WebGestaltRMultiOmicsGSEA(
analyteLists = NULL,
analyteListFiles = NULL,
analyteTypes = NULL,
enrichMethod = "GSEA",
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
collapseMethod = "mean",
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 100,
setCoverNum = 10,
perNum = 1000,
gseaP = 1,
isOutput = TRUE,
outputDirectory = getwd(),
projectName = NULL,
dagColor = "binary",
saveRawGseaResult = FALSE,
gseaPlotFormat = "png",
nThreads = 1,
cache = NULL,
hostName = "https://www.webgestalt.org/",
useWeightedSetCover = TRUE,
useAffinityPropagation = FALSE,
usekMedoid = FALSE,
kMedoid_k = 25,
isMetaAnalysis = TRUE,
mergeMethod = "mean",
normalizationMethod = "rank",
listNames = NULL
)
Arguments
analyteLists |
|
analyteListFiles |
If |
analyteTypes |
a vector containing the ID types of the analyte lists. |
enrichMethod |
Enrichment methods: |
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
enrichDatabase |
The functional categories for the enrichment analysis. Users can use
the function |
enrichDatabaseFile |
Users can provide one or more GMT files as the functional
category for enrichment analysis. The extension of the file should be |
enrichDatabaseType |
The ID type of the genes in the |
enrichDatabaseDescriptionFile |
Users can also provide description files for the custom
|
collapseMethod |
The method to collapse duplicate IDs with scores. |
minNum |
WebGestaltR will exclude the categories with the number of annotated genes
less than |
maxNum |
WebGestaltR will exclude the categories with the number of annotated genes
larger than |
fdrMethod |
For the ORA method, WebGestaltR supports five FDR methods: |
sigMethod |
Two methods of significance are available in WebGestaltR: |
fdrThr |
The significant threshold for the |
topThr |
The threshold for the |
reportNum |
The number of enriched categories visualized in the final report. The default
is |
setCoverNum |
The number of expected gene sets after set cover to reduce redundancy.
It could get fewer sets if the coverage reaches 100%. The default is |
perNum |
The number of permutations for the GSEA method. The default is |
gseaP |
The exponential scaling factor of the phenotype score. The default is |
isOutput |
If |
outputDirectory |
The output directory for the results. |
projectName |
The name of the project. If |
dagColor |
If |
saveRawGseaResult |
Whether the raw result from GSEA is saved as a RDS file, which can be
used for plotting. Defaults to
|
gseaPlotFormat |
The graphic format of GSEA enrichment plots. Either |
nThreads |
The number of cores to use for GSEA and set cover, and in batch function. |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
useWeightedSetCover |
Use weighted set cover for ORA. Defaults to |
useAffinityPropagation |
Use affinity propagation for ORA. Defaults to |
usekMedoid |
Use k-medoid for ORA. Defaults to |
kMedoid_k |
The number of clusters for k-medoid. Defaults to |
isMetaAnalysis |
whether to perform meta-analysis. Defaults to |
mergeMethod |
The method to merge the results from multiple omics (options: |
normalizationMethod |
The method to normalize the results from multiple omics (options: |
listNames |
The names of the analyte lists. |
Multi-omics ORA importFrom dplyr bind_rows left_join arrange select desc importFrom readr write_tsv
Description
Multi-omics ORA importFrom dplyr bind_rows left_join arrange select desc importFrom readr write_tsv
Usage
WebGestaltRMultiOmicsOra(
analyteLists = NULL,
analyteListFiles = NULL,
analyteTypes = NULL,
enrichMethod = "ORA",
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
collapseMethod = "mean",
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 100,
setCoverNum = 10,
perNum = 1000,
gseaP = 1,
isOutput = TRUE,
outputDirectory = getwd(),
projectName = NULL,
dagColor = "binary",
nThreads = 1,
cache = NULL,
hostName = "https://www.webgestalt.org/",
useWeightedSetCover = TRUE,
useAffinityPropagation = FALSE,
usekMedoid = FALSE,
kMedoid_k = 25,
referenceLists = NULL,
referenceListFiles = NULL,
referenceTypes = NULL,
referenceSets = NULL,
listNames = NULL
)
Arguments
analyteLists |
|
analyteListFiles |
If |
analyteTypes |
a vector containing the ID types of the analyte lists. |
enrichMethod |
Enrichment methods: |
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
enrichDatabase |
The functional categories for the enrichment analysis. Users can use
the function |
enrichDatabaseFile |
Users can provide one or more GMT files as the functional
category for enrichment analysis. The extension of the file should be |
enrichDatabaseType |
The ID type of the genes in the |
enrichDatabaseDescriptionFile |
Users can also provide description files for the custom
|
collapseMethod |
The method to collapse duplicate IDs with scores. |
minNum |
WebGestaltR will exclude the categories with the number of annotated genes
less than |
maxNum |
WebGestaltR will exclude the categories with the number of annotated genes
larger than |
fdrMethod |
For the ORA method, WebGestaltR supports five FDR methods: |
sigMethod |
Two methods of significance are available in WebGestaltR: |
fdrThr |
The significant threshold for the |
topThr |
The threshold for the |
reportNum |
The number of enriched categories visualized in the final report. The default
is |
setCoverNum |
The number of expected gene sets after set cover to reduce redundancy.
It could get fewer sets if the coverage reaches 100%. The default is |
perNum |
The number of permutations for the GSEA method. The default is |
gseaP |
The exponential scaling factor of the phenotype score. The default is |
isOutput |
If |
outputDirectory |
The output directory for the results. |
projectName |
The name of the project. If |
dagColor |
If |
nThreads |
The number of cores to use for GSEA and set cover, and in batch function. |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
useWeightedSetCover |
Use weighted set cover for ORA. Defaults to |
useAffinityPropagation |
Use affinity propagation for ORA. Defaults to |
usekMedoid |
Use k-medoid for ORA. Defaults to |
kMedoid_k |
The number of clusters for k-medoid. Defaults to |
referenceLists |
For the ORA method, users can also use an R object as the reference
gene list. |
referenceListFiles |
For the ORA method, the users need to upload the reference gene
list. The extension of the |
referenceTypes |
Vector of the ID types of the reference lists. The supported ID types
of WebGestaltR for the selected organism can be found by the function |
referenceSets |
Users can directly select the reference sets from existing platforms in
WebGestaltR and do not need to provide the reference set through |
listNames |
The names of the analyte lists. |
Affinity Propagation
Description
Use affinity propagation to cluster similar gene sets to reduce redundancy in report.
Usage
affinityPropagation(idsInSet, score)
Arguments
idsInSet |
A list of set names and their member IDs. |
score |
A vector of addible scores with the same length used to assign input preference; higher score has larger weight, i.e. -logP. |
Value
A list of clusters and representatives for each cluster.
- clusters
A list of character vectors of set IDs in each cluster.
- representatives
A character vector of representatives for each cluster.
Author(s)
Zhiao Shi, Yuxing Liao
cacheUrl
Description
Get data from a URL or cache and optionally save in cache for reuse
Usage
cacheUrl(dataUrl, cache = NULL, query = NULL)
Arguments
dataUrl |
The URL of data |
cache |
The cache directory. Defaults to |
query |
The list of queries passed on to httr methods |
Value
response object from httr request
createMetaReport
Description
Generate HTML report for ORA and GSEA MetaAnalysis
Usage
createMetaReport(
hostName = NULL,
outputDirectory = NULL,
organism = "hsapiens",
projectName = NULL,
enrichMethod = NULL,
geneSet_list = NULL,
geneSetDes_list = NULL,
geneSetDag_list = NULL,
geneSetNet_list = NULL,
interestingGeneMap_list = NULL,
referenceGeneList_list = NULL,
enrichedSig_list = NULL,
geneTables_list = NULL,
clusters_list = NULL,
background_list,
enrichDatabase_list = NULL,
enrichDatabaseFile_list = NULL,
enrichDatabaseType_list = NULL,
enrichDatabaseDescriptionFile_list = NULL,
interestGeneFile_list = NULL,
interestGene_list = NULL,
interestGeneType_list = NULL,
collapseMethod = "mean",
referenceGeneFile_list = NULL,
referenceGene_list = NULL,
referenceGeneType_list = NULL,
referenceSet_list = NULL,
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 20,
perNum = 1000,
p = 1,
dagColor = "binary",
listNames = NULL
)
createMetaSummaryReport
Description
Generate HTML report for ORA and GSEA
Usage
createMetaSummaryReport(
hostName,
outputDirectory,
organism = "hsapiens",
projectName,
enrichMethod,
geneSet,
geneSetDes,
geneSetDag,
geneSetNet,
interestingGeneMap,
referenceGeneList,
enrichedSig,
geneTables,
clusters,
background,
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
interestGeneFile = NULL,
interestGene = NULL,
interestGeneType = NULL,
collapseMethod = "mean",
referenceGeneFile = NULL,
referenceGene = NULL,
referenceGeneType = NULL,
referenceSet = NULL,
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 20,
perNum = 1000,
p = 1,
dagColor = "binary",
is_meta = TRUE,
outputHtmlFile = NULL,
listNames = NULL
)
Create HTML Report for NTA
Description
Create HTML Report for NTA
Usage
createNtaReport(
networkName,
method,
sigMethod,
fdrThr,
topThr,
highlightType,
outputDirectory,
projectDir,
projectName,
hostName,
listName = listName
)
createReport
Description
Generate HTML report for ORA and GSEA
Usage
createReport(
hostName,
outputDirectory,
organism = "hsapiens",
projectName,
enrichMethod,
geneSet,
geneSetDes,
geneSetDag,
geneSetNet,
interestingGeneMap,
referenceGeneList,
enrichedSig,
geneTables,
clusters,
background,
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
interestGeneFile = NULL,
interestGene = NULL,
interestGeneType = NULL,
collapseMethod = "mean",
referenceGeneFile = NULL,
referenceGene = NULL,
referenceGeneType = NULL,
referenceSet = NULL,
minNum = 10,
maxNum = 500,
fdrMethod = "BH",
sigMethod = "fdr",
fdrThr = 0.05,
topThr = 10,
reportNum = 20,
perNum = 1000,
p = 1,
dagColor = "binary",
is_meta = FALSE,
outputHtmlFile = NULL,
listName = NULL
)
enrichResultSection
Description
Conditionally render template of main result section. Actual work is carried out in front end
Usage
enrichResultSection(
enrichMethod,
enrichedSig,
geneSet,
geneSetDes,
geneSetDag,
geneSetNet,
clusters
)
Expand enriched GO IDs to include ancestors up to the root
Description
Returns expanded nodes and DAG tree edges
Usage
expandDag(goTermList, dagEdgeList)
Fill relation data frame for GSEA input
Description
Fill 1 for gene in gene set
Usage
fill_input_data_frame(gmt, genes, gene_sets)
Arguments
gmt |
A Data Frame with geneSet and gene columns from the GMT file |
genes |
A vector of genes |
gene_sets |
A vector of gene sets |
Details
See https://github.com/extendr/extendr/issues/612 for how to export DataFrame
## Diagram “'shell Gene Sets First column named 'gene' containing gene name A0100110100 1 = in set Genes B0100101000 0 = not in set C1011101001 Due to limitiations with extendr-api v 0.6.0, function returns a list, and the R package will add the first 'gene' column “'
Value
A Data Frame with the first column of gene and 1 or 0 for other columns of gene sets.
Author(s)
John Elizarraras
Check Format and Read Data
Description
Check Format and Read Data
Usage
formatCheck(dataType = "list", inputGeneFile = NULL, inputGene = NULL)
Arguments
dataType |
Type of data, either |
inputGeneFile |
The data file to be mapped. |
inputGene |
Or the input could be given as an R object.
GMT file should be read with |
Value
A list of data frame
GO Slim Summary
Description
Outputs a brief summary of input genes based on GO Slim data.
Usage
goSlimSummary(
organism = "hsapiens",
geneList,
outputFile,
outputType = "pdf",
isOutput = TRUE,
cache = NULL,
hostName = "https://www.webgestalt.org"
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
geneList |
A list of input genes. |
outputFile |
Output file name. |
outputType |
File format of the plot: |
isOutput |
Boolean if a plot is save to |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
Value
A list of the summary result.
Run GSEA using rust library
Description
Run GSEA using rust library
Usage
gsea_rust(min_overlap, max_overlap, permutations, sets, parts, analytes, ranks)
Arguments
min_overlap |
the minimum overlap between analyte set and analyte list |
max_overlap |
the maximum overlap between analyte set and analyte list |
permutations |
the number of permutations to run |
sets |
A vector of analyte set names |
parts |
A list of the analytse in the analyte sets |
analytes |
A vector of analytes names in the GSEA list |
ranks |
A vector of ranks for the analytes in the GSEA list |
Value
List of the results of GSEA
Author(s)
John Elizarraras
ID Mapping
Description
ID mapping utility with WebGestalt server.
Usage
idMapping(
organism = "hsapiens",
dataType = "list",
inputGeneFile = NULL,
inputGene = NULL,
sourceIdType,
targetIdType = NULL,
collapseMethod = "mean",
mappingOutput = FALSE,
outputFileName = "",
cache = NULL,
hostName = "https://www.webgestalt.org/"
)
idToSymbol(
organism = "hsapiens",
dataType = "list",
inputGeneFile = NULL,
inputGene = NULL,
sourceIdType = "ensembl_gene_id",
collapseMethod = "mean",
mappingOutput = FALSE,
outputFileName = NULL,
cache = NULL,
hostName = "https://www.webgestalt.org/"
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
dataType |
Type of data, either |
inputGeneFile |
The data file to be mapped. |
inputGene |
Or the input could be given as an R object.
GMT file should be read with |
sourceIdType |
The ID type of the data. |
targetIdType |
The ID type of the mapped data. |
collapseMethod |
The method to collapse duplicate IDs with scores. |
mappingOutput |
Boolean if the mapping output is written to file. |
outputFileName |
The output file name. |
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
Value
A list of mapped and unmapped IDs.
Jaccard Similarity
Description
Calculate Jaccard Similarity.
Usage
jaccardSim(idsInSet, score)
Arguments
idsInSet |
A list of set names and their member IDs. |
score |
A vector of addible scores with the same length used to assign input preference; higher score has larger weight, i.e. -logP. |
Value
A list of similarity matrix sim.mat and input preference vector ip.vec.
Author(s)
Zhiao Shi, Yuxing Liao
kMedoid
Description
kMedoid clustering
Usage
kMedoid(idsInSet, score, maxK = 10)
Arguments
idsInSet |
a list of sets of ids |
score |
a vector of scores for each set |
maxK |
maximum number of clusters |
keepRep
Description
Add representatives of redundancy-reduced clusters to topResult if they are missing.
Usage
keepRep(topResult, allResult, reps)
Modify the link to highlight the genes in the pathways
Description
Currently, we only have wikipathway and kegg pathways that need to modify the link
Usage
linkModification(
enrichMethod,
enrichPathwayLink,
geneList,
interestingGeneMap,
hostName = "https://www.webgestalt.org/"
)
List WebGestalt Servers
Description
List available WebGestalt servers.
Usage
listArchiveUrl()
Value
A data frame of available servers.
List Gene Sets
Description
List available gene sets for the given organism on WebGestalt server.
Usage
listGeneSet(
organism = "hsapiens",
hostName = "https://www.webgestalt.org/",
cache = NULL
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
hostName |
The server URL for accessing data. Mostly for development purposes. |
cache |
A directory to save data cache for reuse. Defaults to |
Value
A data frame of available gene sets.
List ID Types
Description
List supported ID types for the given organism on WebGestalt server.
Usage
listIdType(
organism = "hsapiens",
hostName = "https://www.webgestalt.org/",
cache = NULL
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
hostName |
The server URL for accessing data. Mostly for development purposes. |
cache |
A directory to save data cache for reuse. Defaults to |
Value
A list of supported gene sets.
List Organisms
Description
List supported organisms on WebGestalt server.
Usage
listOrganism(hostName = "https://www.webgestalt.org/", cache = NULL)
Arguments
hostName |
The server URL for accessing data. Mostly for development purposes. |
cache |
A directory to save data cache for reuse. Defaults to |
Value
A list of supported organisms.
List Reference Sets
Description
List available reference sets for the given organism on WebGestalt server.
Usage
listReferenceSet(
organism = "hsapiens",
hostName = "https://www.webgestalt.org/",
cache = NULL
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
hostName |
The server URL for accessing data. Mostly for development purposes. |
cache |
A directory to save data cache for reuse. Defaults to |
Value
A list of reference sets.
Load gene set data
Description
Load gene set data
Usage
loadGeneSet(
organism = "hsapiens",
enrichDatabase = NULL,
enrichDatabaseFile = NULL,
enrichDatabaseType = NULL,
enrichDatabaseDescriptionFile = NULL,
cache = NULL,
hostName = "https://www.webgestalt.org/",
isMultiOmics = FALSE
)
Arguments
organism |
Currently, WebGestaltR supports 12 organisms. Users can use the function
|
enrichDatabase |
The functional categories for the enrichment analysis. Users can use
the function |
enrichDatabaseFile |
Users can provide one or more GMT files as the functional
category for enrichment analysis. The extension of the file should be |
enrichDatabaseType |
The ID type of the genes in the |
enrichDatabaseDescriptionFile |
Users can also provide description files for the custom
|
cache |
A directory to save data cache for reuse. Defaults to |
hostName |
The server URL for accessing data. Mostly for development purposes. |
isMultiOmics |
Boolean if loading gene sets for multiomics. Defaults to |
Value
A list of geneSet, geneSetDes, geneSetDag, geneSetNet, standardId.
- geneSet
Gene set: A data frame with columns of "geneSet", "description", "genes"
- geneSetDes
Description: A data frame with columns of two columns of gene set ID and description
- geneSetDag
DAG: A edge list data frame of two columns of parent and child. Or a list of data frames if multilple databases are given.
- geneSetNet
Network: A edge list data frame of two columns connecting nodes. Or a list of data frames if multilple databases are given.
- standardId
The standard ID of the gene set
metaEnrichResultSection
Description
Conditionally render template of main result section. Actual work is carried out in front end
Usage
metaEnrichResultSection(
enrichMethod,
enrichedSig,
geneSet,
geneSetDes,
geneSetDag,
geneSetNet,
clusters
)
Modify the link to highlight the genes in the pathways
Description
Currently, we only have wikipathway and kegg pathways that need to modify the link
Usage
metaLinkModification(
enrichMethod,
enrichPathwayLink,
geneList,
interestingGeneMap_list,
hostName = "https://www.webgestalt.org/",
geneSet
)
metaSummaryDescription
Description
Render job summary section
Usage
metaSummaryDescription(
projectName,
organism,
interestGeneFile,
interestGene,
interestGeneType,
enrichMethod,
enrichDatabase,
enrichDatabaseFile,
enrichDatabaseType,
enrichDatabaseDescriptionFile,
interestingGeneMap,
referenceGeneList,
referenceGeneFile,
referenceGene,
referenceGeneType,
referenceSet,
minNum,
maxNum,
sigMethod,
fdrThr,
topThr,
fdrMethod,
enrichedSig,
reportNum,
perNum,
p,
geneSet,
repAdded,
numAnnoRefUserId,
hostName,
listNames
)
Site Weighted Gene Set Enrichment Analysis
Description
Performs site weighted gene set enrichment analysis or standard GSEA when
likelihood/weight columns in input_df are 1 or 0, p=1,
q=1 and thresh_type="val".
Usage
multiswGsea(
input_df_list,
thresh_type = "percentile",
thresh = 0.9,
thresh_action = "exclude",
min_set_size = 10,
max_set_size = 500,
max_score = "max",
min_score = "min",
psuedocount = 0.001,
perms = 1000,
p = 1,
q = 1,
nThreads = 1,
rng_seed = 1,
fork = FALSE,
fdrMethod = "BH"
)
Arguments
input_df_list |
A data frame in which first column is name of item of interest (gene, protein, phosphosite, etc.), the second is the correlation of that item of interest with the phenotype (typically log ratio of expression for phenotype vs. normal), and the remaining columns are the scores for the likelihood that the item belongs in each set (one column per set). |
thresh_type |
The type of |
thresh |
Depends on |
thresh_action |
Either "include", "exclude (default)", or "adjust"; this specifies how to treat each set if it doesn't contain a minimum number of items or contains all of the items; this option cannot be used with predefined lists of items in sets (if the number of items in a given set doesn't meet requirements, that set will be skipped). |
min_set_size, max_set_size |
The minimum/maximum number of items each set needs for the analysis to proceed. |
max_score, min_score |
A optional numeric vector of minimum/maximum boundaries to clip scores for each set. |
psuedocount |
Psuedocount (pc) is used for rescaling set scores:
|
perms |
The number of permutations. |
p |
The exponential scaling factor of the phenotype score (second column in
|
q |
The exponential scaling factor of the likelihood score (weights). |
nThreads |
The number of threads to use in calculating permutaions. |
rng_seed |
Random seed. |
fork |
A boolean. Whether pass "fork" to |
fdrMethod |
For the ORA method, WebGestaltR supports five FDR methods: |
Details
The formula for weighting is as follows
\frac{s_{j}^{q}|r_{j}|^{p}}{\sum s^{q}|r|^{p}}
Where r is log ratio score, s is likelihood score, j is the index of the gene.
Value
A list of Enrichment_Results, Items_in_Set and Running_Sums.
- Enrichment_Results
A data frame with row names of gene set and columns of "ES", "NES", "p_val", "fdr".
- Items_in_Set
A list of one-column data frames. Describes genes and their ranks in each set.
- Running_Sums
Running sum scores along genes sorted by ranked scores, with gene sets as columns.
Author(s)
John Elizarraras
Calculate random walk permutations for a network from seeds
Description
Calculate random walk permutations for a network from seeds
Usage
nta_rust(edge_list, seeds)
Arguments
edge_list |
A list of edges |
seeds |
A list of seeds |
Value
A list of nodes and scores
Author(s)
John Elizarraras
Run ORA using Rust library
Description
Run ORA using Rust library
Usage
ora_rust(sets, parts, interest, reference)
Arguments
sets |
A vector of analyte set names |
parts |
A list of the analyte in the analyte sets |
interest |
A vector of analytes of interest |
reference |
A vector of analytes in the reference set |
Value
A list of the results of ORA
Author(s)
John Elizarraras
Prepare input for standard GSEA
Description
A helper to read files for performing standard GSEA.
Usage
prepareGseaInput(rankFile, gmtFile)
Arguments
rankFile |
Path of the rnk file |
gmtFile |
Path of the GMT file |
Value
a data frame to be used in swGsea
Prepare Input Matrix for GSEA
Description
Prepare Input Matrix for GSEA
Usage
prepareInputMatrixGsea(rank, gmt)
Arguments
rank |
A 2 column Data Frame of gene and score |
gmt |
3 column Data Frame of geneSet, description, and gene |
Value
A matrix used for input to swGsea.
Read GMT File
Description
Read GMT File
Usage
readGmt(gmtFile, cache = NULL)
Arguments
gmtFile |
The file path or URL of the GMT file. |
cache |
A directory to save data cache for reuse. Defaults to |
Value
A data frame with columns of "geneSet", "description", "gene".
Run multiomics ORA using Rust library
Description
Run multiomics ORA using Rust library
Usage
rust_multiomics_ora(sets, big_part_vec, interest, reference, method)
Arguments
sets |
list of the names of the analyte sets |
big_part_vec |
list of the analyte in the analyte sets |
interest |
list of analytes of interest |
reference |
list of analytes in the reference set |
method |
meta-analysis method to get meta-p values |
Value
A list of vectors containing the results of ORA, with each list corresponding to each input list
Author(s)
John Elizarraras
specificParameterSummaryGsea
Description
Render job summary section of GSEA specific parameters
Usage
specificParameterSummaryGsea(
organism,
interestingGeneMap,
geneSet,
minNum,
maxNum,
sigMethod,
fdrThr,
topThr,
perNum,
p,
enrichedSig,
reportNum,
repAdded
)
specificParameterSummaryOra
Description
Render job summary section of ORA specific parameters
Usage
specificParameterSummaryOra(
organism,
referenceGeneList,
geneSet,
referenceGeneFile,
referenceGene,
referenceGeneType,
referenceSet,
minNum,
maxNum,
sigMethod,
fdrThr,
topThr,
fdrMethod,
enrichedSig,
reportNum,
repAdded,
numAnnoRefUserId,
interestingGeneMap,
hostName
)
summaryDescription
Description
Render job summary section
Usage
summaryDescription(
projectName,
organism,
interestGeneFile,
interestGene,
interestGeneType,
enrichMethod,
enrichDatabase,
enrichDatabaseFile,
enrichDatabaseType,
enrichDatabaseDescriptionFile,
interestingGeneMap,
referenceGeneList,
referenceGeneFile,
referenceGene,
referenceGeneType,
referenceSet,
minNum,
maxNum,
sigMethod,
fdrThr,
topThr,
fdrMethod,
enrichedSig,
reportNum,
perNum,
p,
geneSet,
repAdded,
numAnnoRefUserId,
hostName
)
Site Weighted Gene Set Enrichment Analysis
Description
Performs site weighted gene set enrichment analysis or standard GSEA when
likelihood/weight columns in input_df are 1 or 0, p=1,
q=1 and thresh_type="val".
Usage
swGsea(
input_df,
thresh_type = "percentile",
thresh = 0.9,
thresh_action = "exclude",
min_set_size = 10,
max_set_size = 500,
max_score = "max",
min_score = "min",
psuedocount = 0.001,
perms = 1000,
p = 1,
q = 1,
nThreads = 1,
rng_seed = 1,
fork = FALSE
)
Arguments
input_df |
A data frame in which first column is name of item of interest (gene, protein, phosphosite, etc.), the second is the correlation of that item of interest with the phenotype (typically log ratio of expression for phenotype vs. normal), and the remaining columns are the scores for the likelihood that the item belongs in each set (one column per set). |
thresh_type |
The type of |
thresh |
Depends on |
thresh_action |
Either "include", "exclude (default)", or "adjust"; this specifies how to treat each set if it doesn't contain a minimum number of items or contains all of the items; this option cannot be used with predefined lists of items in sets (if the number of items in a given set doesn't meet requirements, that set will be skipped). |
min_set_size, max_set_size |
The minimum/maximum number of items each set needs for the analysis to proceed. |
max_score, min_score |
A optional numeric vector of minimum/maximum boundaries to clip scores for each set. |
psuedocount |
Psuedocount (pc) is used for rescaling set scores:
|
perms |
The number of permutations. |
p |
The exponential scaling factor of the phenotype score (second column in
|
q |
The exponential scaling factor of the likelihood score (weights). |
nThreads |
The number of threads to use in calculating permutaions. |
rng_seed |
Random seed. |
fork |
A boolean. Whether pass "fork" to |
Details
The formula for weighting is as follows
\frac{s_{j}^{q}|r_{j}|^{p}}{\sum s^{q}|r|^{p}}
Where r is log ratio score, s is likelihood score, j is the index of the gene.
Value
A list of Enrichment_Results, Items_in_Set and Running_Sums.
- Enrichment_Results
A data frame with row names of gene set and columns of "ES", "NES", "p_val", "fdr".
- Items_in_Set
A list of one-column data frames. Describes genes and their ranks in each set.
- Running_Sums
Running sum scores along genes sorted by ranked scores, with gene sets as columns.
Author(s)
Eric Jaehnig
Weighted Set Cover
Description
Size constrained weighted set cover problem to find top N sets while maximizing the coverage of all elements.
Usage
weightedSetCover(idsInSet, costs, topN, nThreads = 4)
Arguments
idsInSet |
A list of set names and their member IDs. |
costs |
A vector of the same length to add weights for penalty, i.e. 1/-logP. |
topN |
The number of sets (or less when it completes early) to return. |
nThreads |
The number of processes to use. In Windows, it fallbacks to 1. |
Value
A list of topSets and coverage.
- topSets
A list of set IDs.
- coverage
The percentage of IDs covered in the top sets.
Author(s)
Zhiao Shi, Yuxing Liao