mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Add rankings plot
This commit is contained in:
parent
1871c3b870
commit
b6e1bc6603
2 changed files with 39 additions and 0 deletions
31
R/server.R
31
R/server.R
|
|
@ -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({
|
output$boxplot <- plotly::renderPlotly({
|
||||||
preset <- preset()
|
preset <- preset()
|
||||||
gene_sets <- list("Reference genes" = preset$reference_gene_ids)
|
gene_sets <- list("Reference genes" = preset$reference_gene_ids)
|
||||||
|
|
|
||||||
8
R/ui.R
8
R/ui.R
|
|
@ -41,6 +41,14 @@ ui <- fluidPage(
|
||||||
height = "600px"
|
height = "600px"
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
|
div(
|
||||||
|
style = "margin-top: 16px",
|
||||||
|
plotly::plotlyOutput(
|
||||||
|
"rankings_plot",
|
||||||
|
width = "100%",
|
||||||
|
height = "600px"
|
||||||
|
)
|
||||||
|
),
|
||||||
div(
|
div(
|
||||||
style = "margin-top: 16px",
|
style = "margin-top: 16px",
|
||||||
plotly::plotlyOutput(
|
plotly::plotlyOutput(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue