Add rankings plot

This commit is contained in:
Elias Projahn 2021-12-06 14:24:31 +01:00
parent 1871c3b870
commit b6e1bc6603
2 changed files with 39 additions and 0 deletions

View file

@ -164,6 +164,37 @@ server <- function(input, output, session) {
)
})
output$rankings_plot <- plotly::renderPlotly({
preset <- preset()
gene_sets <- list("Reference genes" = preset$reference_gene_ids)
comparison_gene_ids <- comparison_gene_ids()
if (length(comparison_gene_ids) >= 1) {
gene_sets <- c(
gene_sets,
list("Comparison genes" = comparison_gene_ids)
)
}
all <- ranking()
clusteriness <- geposan::ranking(all, list(clusteriness = 1))
correlation <- geposan::ranking(all, list(correlation = 1))
neural <- geposan::ranking(all, list(neural = 1))
adjacency <- geposan::ranking(all, list(adjacency = 1))
proximity <- geposan::ranking(all, list(proximity = 1))
rankings <- list(
"Clusteriness" = clusteriness,
"Correlation" = correlation,
"Neural" = neural,
"Adjacency" = adjacency,
"Proximity" = proximity,
"Combined" = all
)
geposan::plot_rankings(rankings, gene_sets)
})
output$boxplot <- plotly::renderPlotly({
preset <- preset()
gene_sets <- list("Reference genes" = preset$reference_gene_ids)

8
R/ui.R
View file

@ -41,6 +41,14 @@ ui <- fluidPage(
height = "600px"
)
),
div(
style = "margin-top: 16px",
plotly::plotlyOutput(
"rankings_plot",
width = "100%",
height = "600px"
)
),
div(
style = "margin-top: 16px",
plotly::plotlyOutput(