Skip to content

Commit

Permalink
Flame 2.0 update + help pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vagkaratzas committed Feb 14, 2023
1 parent a02edd4 commit 4496899
Show file tree
Hide file tree
Showing 148 changed files with 277,465 additions and 1,732 deletions.
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
# Flame
A web tool for Functional and Literature Enrichment analysis of multiple sets.
Visualization and interpretation of functional and literature enrichment analysis results from multiple sets

With Flame one can:<br/>
* Upload multiple gene/protein lists<br/>
* Combine lists by calculating their unions and intersections with the help of UpSet plots<br/>
* Perform functional enrichment analysis on any of the combined lists<br/>
* Perform literature enrichment analysis on any of the combined lists<br/>
* Generate protein-protein interaction networks<br/>
* Visualize and export the functional enrichment results<br/>
* Explore results with the use of heatmaps, bar charts, Manhattan plots, networks and tables<br/>
* Perform network analysis and see gene-function, function-function and gene-gene associations<br/>
* Apply interactive filters on the generated plots<br/>
* Perform cross-database and cross-species id conversions<br/>
With Flame one can:
* Upload multiple gene/protein lists, SNPs, free text or gene expression results (Volcano plot)
* Combine lists by calculating their unions and intersections with the help of UpSet plots
* Perform functional enrichment analysis on any of the combined lists for more than 14,000 organisms, using four tools (aGOtool, gProfiler, WebGestalt, enrichR)
* Combine and compare enrichment results from multiple runs
* Perform literature enrichment analysis on any of the combined lists, using aGOtool
* Generate protein-protein interaction networks via STRING
* Visualize results with the use of networks, heatmaps, bar charts, scatter plots and searchable tables
* Perform network analysis at the gene-function, function-function and gene-gene association levels
* Visualize networks in interactive, multi-layered views with Arena3Dweb
* Combine data sources and apply interactive filters on the generated plots
* Perform cross-database and cross-species id conversions
* Utilize our API to connect Flame with external applications

Flame is written in R/Shiny and JavaScript and is available at http://flame.pavlopouloslab.info

Check our publication at https://www.mdpi.com/2079-7737/10/7/665
# Installation

* Download and install the Flame image from Docker Hub: https://hub.docker.com/r/pavlopouloslab/flame

* Otherwise, download this GitHub repo and run Flame via RStudio. R (https://www.r-project.org/) and RStudio (https://rstudio.com/) must be installed. Make sure the following R libraries are also installed:
**shinyjs**, **shinyalert**, **bsplus**, **upsetjs**, **stringr**, **httr**, **httpuv**, **curl**, **jsonlite**, **gprofiler2**, **WebGestaltR**, **shinydashboard**, **shinyWidgets**, **DT**, **tidyr**, **enrichR**, **plotly**, **igraph**, **visNetwork**.
To start the program, double click on the **Flame.Rproj** file. This opens the RStudio process. Then, open the **server.R** file in RStudio and in the Run App options choose "Run External" and then click Run App.

# Cite
Thanati, F., Karatzas, E., Baltoumas, F.A., Stravopodis, D.J., Eliopoulos, A.G. and Pavlopoulos, G.A., 2021.
**FLAME: a web tool for functional and literature enrichment analysis of multiple gene lists.**
Biology, 10(7), p.665, doi: 10.3390/biology10070665
https://www.mdpi.com/2079-7737/10/7/665
1 change: 1 addition & 0 deletions config/global_settings.R
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
options(shiny.maxRequestSize = 1.0 * 1024^2) # uploaded files < 1MB each
69 changes: 69 additions & 0 deletions config/global_variables.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Input ####
# Volcano
DEFAULT_VOLCANO_LOG10PVALUE_THRESHOLD <- 1.30103
DEFAULT_VOLCANO_LOG10PVALUE_STEP <- 0.00001
DEFAULT_VOLCANO_LOG2FC_THRESHOLD <- 1
DEFAULT_VOLCANO_LOG2FC_STEP <- 0.001

# Enrichment ####
ENRICHMENT_TOOLS <- c("aGOtool", "gProfiler", "WebGestalt", "enrichR") # david
TAB_NAMES <- list(
"ALL" = "all",
"GO:MF" = "gomf", "GO:CC" = "gocc", "GO:BP" = "gobp",
"KEGG" = "kegg", "REAC" = "reac", "WP" = "wp", "PANTHER" = "panther",
"INTERPRO" = "interpro", "PFAM" = "pfam", "UNIPROT" = "uniprot",
"DO" = "do", "DISGENET" = "disgenet", "OMIM" = "omim", "GLAD4U_DISEASE" = "glad4udisease", "ORPHA" = "orpha",
"DRUGBANK" = "drugbank", "GLAD4U_DRUG" = "glad4udrug",
"BTO" = "brenda", "WBBT" = "wbbt", "TF" = "tf",
"MIRNA" = "mirna", "CORUM" = "corum",
"HPA" = "hpa", "HP" = "hp", "WBP" = "wbp", "MGI" = "mgi"
)
TAB_NAMES_CODES <- as.character(TAB_NAMES)
ENRICHMENT_DATASOURCES <- names(TAB_NAMES[TAB_NAMES != "all"])
NAMESPACES <- list()
NAMESPACES[["CORE"]] <- list(
"ENSEMBL Gene ID" = "ENSG",
"ENSEMBL Protein ID" = "ENSP", "ENSEMBL Transcript ID" = "ENST",
"Entrez Gene Name" = "ENTREZGENE", "Entrez Gene Accession" = "ENTREZGENE_ACC",
"Entrez Gene Transcript Name" = "ENTREZGENE_TRANS_NAME",
"UniProt Gene Name" = "UNIPROT_GN", "UniProt Accession" = "UNIPROT_GN_ACC",
"UniProt Archive" = "UNIPARC", "RefSeq Protein Accession" = "REFSEQ_PEPTIDE_ACC",
"RefSeq mRNA" = "REFSEQ_MRNA", "RefSeq mRNA Accession" = "REFSEQ_MRNA_ACC",
"RefSeq Non-coding RNA Accession" = "REFSEQ_NCRNA_ACC",
"EMBL Accession" = "EMBL", "ChEMBL" = "CHEMBL",
"WIKIGENE ID" = "WIKIGENE"
)
NAMESPACES[["SPECIAL"]] <- list()
NAMESPACES[["SPECIAL"]][["amellifera"]] <- c("BEEBASE" = "BEEBASE")
NAMESPACES[["SPECIAL"]][["dmelanogaster"]] <- c("FLYBASE_GENE_ID" = "FLYBASE_GENE_ID")
NAMESPACES[["AGOTOOL"]] <- list("ENSEMBL Protein ID" = "ENSP")
UI_TERM_KEYWORD <- list(
"functional" = "functions", "literature" = "articles"
)

# Plots ####
# Network
NETWORK_IDS <- c("network1", "network2", "network3")
LAYOUT_CHOICES <- list(
`layout_with_graphopt` = "Graph Opt", `layout_nicely`= "Fruchterman-Reingold",
`layout_with_kk`= "Kamada-Kawai", `layout_with_mds` = "Multi-dimensional Scaling",
`layout_as_tree` = "Tree", `layout_as_star` = "Star",
`layout_in_circle` = "Circle", `layout_on_grid` = "Grid",
`layout_randomly` = "Random"
)
# Heatmap
HEATMAP_IDS <- c("heatmap1", "heatmap2", "heatmap3")
# Colors
GENE_NODE_COLOR <- "#d1e1d9"
LITERATURE_NODE_COLOR <- "#cc9f9f"
DATASOURCE_COLORS <- c(
"GO:MF" = "#dc3912", "GO:BP" = "#ff9900", "GO:CC" = "#109618",
"KEGG" = "#dd4477", "REAC" = "#3366cc", "WP" = "#0099c6", "PANTHER" = "#634341",
"INTERPRO" = "#8a5103", "PFAM" = "#b3b000", "UNIPROT" = "#55edeb",
"DO" = "#f7c8fa", "DISGENET" = "#c0f0a1", "OMIM" = "#edebaf",
"GLAD4U_DISEASE" = "#9f86d9", "ORPHA" = "#03fcc6", "DRUGBANK" = "#7d4a74", "GLAD4U_DRUG" = "#4a9091",
"BTO" = "#f0d871", "WBBT" = "#9cb59c", "TF" = "#5574a6", "MIRNA" = "#22aa99",
"CORUM" = "#66aa00", "HPA" = "#6633cc", "HP" = "#990099", "WBP" = "#fffd78", "MGI" = "#fc4503",
"PUBMED" = LITERATURE_NODE_COLOR, "GENE" = GENE_NODE_COLOR
)

191 changes: 191 additions & 0 deletions config/server_variables.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Input ####
LISTNAME_NCHAR_LIMIT <- 100
LIST_LIMIT <- 10
GENE_LIST_LIMIT <- 3000
OBJECT_SIZE_LIMIT <- 1000000 # bytes, 1MB
STRING_LIMIT <- 500
RANDOM_GENES_NUMBER <- 200 # currently 674 max # enrichR::genes790
GENE_LIST_PREFIX <- "gene_list"
# Volcano
VOLCANO_COLORS <- c("default" = "#000000",
"overexpressed" = "#eb6e6c", "underexpressed" = "#64e4ed")

# Organisms ####
ORGANISMS <- readRDS("./organisms/organismsDF.RDS")
TOOL_ORGANISMS <- readRDS("./organisms/toolOrganismsList.RDS")
SPECIAL_ORGANISMS <- c("amellifera", "dmelanogaster")
SPECIAL_PREFERRED_TOOL <- list()
SPECIAL_PREFERRED_TOOL[["amellifera"]] <- "gProfiler"
SPECIAL_PREFERRED_TOOL[["dmelanogaster"]] <- "enrichR"
SPECIAL_PREFERRED_NAMESPACE <- list()
SPECIAL_PREFERRED_NAMESPACE[["amellifera"]] <- "BEEBASE"
SPECIAL_PREFERRED_NAMESPACE[["dmelanogaster"]] <- "USERINPUT"

# Enrichment ####
ENRICHMENT_TYPES <- c("functional", "literature")
DATASOURCES_PRINT <- list(
'Gene Ontology' = list(
"Molecular Function (GO:MF)" = "GO:MF",
"Cellular Component (GO:CC)" = "GO:CC",
"Biological Process (GO:BP)" = "GO:BP"
),
'Biological Pathways' = list(
"KEGG" = "KEGG", "Reactome" = "REAC",
"WikiPathways" = "WP", "PANTHER" = "PANTHER"
),
'Diseases' = list(
"Disease Ontology" = "DO", "DisGeNET" = "DISGENET",
"OMIM" = "OMIM", "GLAD4U" = "GLAD4U_DISEASE", "Orphanet" = "ORPHA"
),
'Proteins' = list(
"Interpro" = "INTERPRO", "PFAM" = "PFAM",
"UniProt keywords" = "UNIPROT",
"CORUM"= "CORUM"
),
'Phenotypes' = list(
"Human Phenotype Ontology" = "HP",
"MGI Mammalian Phenotype" = "MGI",
"WormBase Phenotypes" = "WBP"
),
'Tissues' = list(
"Human Protein Atlas (HPA)" = "HPA",
"Brenda Tissue Ontology" = "BTO",
"WormBase Anatomic Associations Ontology" = "WBBT"
),
'Drugs' = list(
"DrugBank" = "DRUGBANK",
"GLAD4U" = "GLAD4U_DRUG"
),
'Regulatory motifs in DNA' = list(
"TRANSFAC" = "TF", "miRTarBase" = "MIRNA"
)
)
DATASOURCES_DEFAULT_SELECTED <- list("GO:MF", "GO:CC", "GO:BP", "KEGG")
DATASOURCES <- list() # gProfiler here, the rest through an init.R function
DATASOURCES[["GPROFILER"]] <- c("GO:MF", "GO:CC", "GO:BP",
"KEGG", "REAC", "WP",
"TF", "MIRNA", "CORUM", "HPA", "HP")
DATASOURCES_CODES <- list()
DATASOURCES_CODES[["AGOTOOL"]] <- list(
"GO:MF" = -23, "GO:CC" = -22, "GO:BP" = -21,
"KEGG" = -52, "REAC" = -57, "WP" = -58,
"INTERPRO" = -54, "PFAM" = -55, "UNIPROT" = -51,
"DO" = -26, "BTO" = -25,
"PUBMED" = -56
)
DATASOURCES_CODES[["WEBGESTALT"]] <- list(
"GO:MF" = "geneontology_Molecular_Function_noRedundant",
"GO:CC" = "geneontology_Cellular_Component_noRedundant",
"GO:BP" = "geneontology_Biological_Process_noRedundant",
"KEGG" = "pathway_KEGG",
"REAC" = "pathway_Reactome",
"WP" = "pathway_Wikipathway",
"PANTHER" = "pathway_Panther",
"DISGENET" = "disease_Disgenet",
"OMIM" = "disease_OMIM",
"GLAD4U_DISEASE" = "disease_GLAD4U",
"DRUGBANK" = "drug_DrugBank",
"GLAD4U_DRUG" = "drug_GLAD4U",
"HP" = "phenotype_Human_Phenotype_Ontology"
)
DATASOURCES_CODES[["ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2021",
"GO:CC" = "GO_Cellular_Component_2021",
"GO:BP" = "GO_Biological_Process_2021",
"KEGG" = "KEGG_2016", # "KEGG_2021_Human" -> doesn't return Ids
"REAC" = "Reactome_2022",
"WP" = "WikiPathway_2021_Human",
"PANTHER" = "Panther_2016",
"HP" = "Human_Phenotype_Ontology"
)
DATASOURCES_CODES[["MOUSE_ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2021",
"GO:CC" = "GO_Cellular_Component_2021",
"GO:BP" = "GO_Biological_Process_2021",
"WP" = "WikiPathways_2019_Mouse",
"MGI" = "KOMP2_Mouse_Phenotypes_2022"
)
DATASOURCES_CODES[["FLY_ENRICHR"]] <-
DATASOURCES_CODES[["FISH_ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2018",
"GO:CC" = "GO_Cellular_Component_2018",
"GO:BP" = "GO_Biological_Process_2018",
"WP" = "WikiPathways_2018"
)
DATASOURCES_CODES[["YEAST_ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2018",
"GO:CC" = "GO_Cellular_Component_2018",
"GO:BP" = "GO_Biological_Process_2018",
"WP" = "WikiPathways_2018",
"KEGG" = "KEGG_2018"
)
DATASOURCES_CODES[["WORM_ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2018",
"GO:CC" = "GO_Cellular_Component_2018",
"GO:BP" = "GO_Biological_Process_2018",
"WP" = "WikiPathways_2018",
"DO" = "Human_Diseases_from_WormBase_2018",
"WBP" = "Phenotypes_WormBase_2018",
"WBBT" = "Anatomic_Associations_WormBase_2018"
)
DATASOURCES_CODES[["OX_ENRICHR"]] <- list(
"GO:MF" = "GO_Molecular_Function_2021",
"GO:CC" = "GO_Cellular_Component_2021",
"GO:BP" = "GO_Biological_Process_2021",
"REAC" = "Reactome_2016",
"WP" = "WikiPathway_2021_Human",
"ORPHA" = "Orphanet_Augmented_2021",
"HP" = "Human_Phenotype_Ontology",
"MGI" = "MGI_Mammalian_Phenotype_Level_4_2019"
)
NAMESPACES[["GPROFILER"]] <- c("User Input" = "USERINPUT", NAMESPACES[["CORE"]])
NAMESPACES[["WEBGESTALT"]] <- list(
"Entrez Gene Accession" = "ENTREZGENE_ACC",
"User Input" = "USERINPUT"
)
NAMESPACES[["ENRICHR"]] <- list(
"Entrez Gene Name" = "ENTREZGENE",
"User Input" = "USERINPUT"
)
NAMESPACES[["FLY_ENRICHR"]] <-
NAMESPACES[["YEAST_ENRICHR"]] <- list(
"User Input" = "USERINPUT"
)
DEFAULT_NAMESPACE_TEXT <- "Default tool namespace conversions"
METRICS <- list()
METRICS[["AGOTOOL"]] <- list("False discovery rate", "P-value")
METRICS[["GPROFILER"]] <- list(
"g:SCS threshold" = "gSCS",
"False discovery rate" = "fdr",
"Bonferroni correction" = "bonferroni"
)
METRICS[["WEBGESTALT"]] <- list(
"Benjamini-Hochberg" = "BH",
"Benjamini-Yekutieli" = "BY",
"Holm" = "holm",
"Hochberg" = "hochberg",
"Hommel" = "hommel",
"Bonferroni adjustment" = "bonferroni"
)
METRICS[["ENRICHR"]] <- list("Adjusted P-value" = "adjusted_pvalue")
DEFAULT_METRIC_TEXT <- "Default tool metrics"
ENRICHMENT_DF_COLNAMES <- c(
"Source", "Term_ID", "Function", "P-value", "Term Size",
"Query size", "Intersection Size", "Positive Hits"
)
AGOTOOL_API_LINK <- "https://agotool.org/api_orig"

# Plots ####
ALL_PLOT_IDS <- c(NETWORK_IDS, HEATMAP_IDS, "barchart", "scatterPlot")
DEFAULT_SLIDER_VALUE <- 50
MAX_SLIDER_VALUE <- 200
SINGLE_BAR_HEIGHT_PX <- 18
MIN_BAR_HEIGHT_PX <- 200
EDGE_WIDTH_MIN <- 0.1
EDGE_WIDTH_MAX <- 3

# Interoperability ####
POST_REQUEST_PATH <- 'tmp/'
ARENA_API_LINK <- "https://bib.fleming.gr/bib/api/arena3dweb" #"http://127.0.0.1:8080/api/arena3dweb"
ARENA_LAYER_SPACING_PIXELS <- 300
ARENA_Y_Z_SAMPLING_LIMIT <- 410
24 changes: 24 additions & 0 deletions config/static_variables.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Input
userInputLists <- list()
checkedListNames <- list() # in combination with js_listNames
volcanoSelectedItems <- c()

# Enrichment
enrichmentResults <- list()
arenaEdgelist <- list()
gprofilerResult <- list() # for gprofiler ManhattanPlot only
combinationResult <- data.frame()

# Current
currentVariantResults <- data.frame()
currentTextminingResult <- c()
currentVolcano <- data.frame()
currentUpsetMode <- ""

currentUserList <- c()
currentEnrichmentType <- ""
currentOrganism <- ""
currentEnrichmentTool <- ""
currentType_Tool <- ""
currentNamespace <- ""
currentSignificanceMetric <- ""
20 changes: 20 additions & 0 deletions config/ui_variables.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Enrichment ####
DEFAULT_TOOL <- "aGOtool"
DEFAULT_TOOL_UPPER <- toupper(DEFAULT_TOOL)
AGOTOOL_DATASOURCES_PRINT_LITERATURE <- list("PubMed Publications" = "PUBMED")

# Plots ####
PLOT_TABNAMES <- c("Network", "Heatmap", "Barchart", "Scatter Plot", "Manhattan")
# Network
LEGEND_ITEMS <- list(
list("GO:MF", "GO:BP", "GO:CC","UNIPROT"),
list("KEGG", "REAC", "WP", "PANTHER"),
list("DO", "DISGENET", "OMIM", "GLAD4U_DISEASE", "ORPHA"),
list("DRUGBANK", "GLAD4U_DRUG", "INTERPRO", "PFAM", "PUBMED"),
list("BTO", "WBBT", "TF", "MIRNA", "CORUM"),
list("HPA", "HP", "WBP", "MGI", "GENE")
)
VIS_NET_HEIGHT <- "850px"

# About ####
YEAR <- substr(Sys.Date(), 1, 4)
Binary file added examples/variants.RDS
Binary file not shown.
Loading

0 comments on commit 4496899

Please sign in to comment.