From f002758fc826ec13c0e419f48bff000b849bbbd5 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Thu, 7 Oct 2021 12:18:47 +0200 Subject: [PATCH] Add gene set enrichment analysis --- server.R | 7 +++++++ ui.R | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/server.R b/server.R index a1fce15..c350986 100644 --- a/server.R +++ b/server.R @@ -1,5 +1,7 @@ library(data.table) library(DT) +library(gprofiler2) +library(plotly) library(shiny) source("init.R") @@ -112,4 +114,9 @@ server <- function(input, output) { scatter_plot(results, species, genes, distances) }) + + output$gost <- renderPlotly({ + result <- gost(results()[, gene], ordered_query = TRUE) + gostplot(result, capped = FALSE, interactive = TRUE) + }) } \ No newline at end of file diff --git a/ui.R b/ui.R index e324a78..bb48778 100644 --- a/ui.R +++ b/ui.R @@ -1,4 +1,5 @@ library(DT) +library(plotly) library(shiny) ui <- fluidPage( @@ -82,6 +83,14 @@ ui <- fluidPage( ) ) ) + ), + wellPanel( + h3("Gene set enrichment analysis"), + plotlyOutput( + "gost", + width = "100%", + height = "600px" + ) ) ) ) \ No newline at end of file