mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Use correct background and show increase for GSEA
This commit is contained in:
parent
12129ac65a
commit
c2328c0847
1 changed files with 11 additions and 9 deletions
20
R/server.R
20
R/server.R
|
|
@ -212,7 +212,8 @@ server <- function(options) {
|
||||||
setProgress(0.2)
|
setProgress(0.2)
|
||||||
gprofiler2::gost(
|
gprofiler2::gost(
|
||||||
results_filtered()[, gene],
|
results_filtered()[, gene],
|
||||||
custom_bg = preset()$gene_ids
|
custom_bg = preset()$gene_ids,
|
||||||
|
domain_scope = "custom_annotated"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -232,12 +233,14 @@ server <- function(options) {
|
||||||
|
|
||||||
data[, total_ratio := term_size / effective_domain_size]
|
data[, total_ratio := term_size / effective_domain_size]
|
||||||
data[, query_ratio := intersection_size / query_size]
|
data[, query_ratio := intersection_size / query_size]
|
||||||
|
data[, increase := (query_ratio - total_ratio) / total_ratio]
|
||||||
|
|
||||||
data <- data[, .(
|
data <- data[, .(
|
||||||
source,
|
source,
|
||||||
term_name,
|
term_name,
|
||||||
total_ratio,
|
total_ratio,
|
||||||
query_ratio,
|
query_ratio,
|
||||||
|
increase,
|
||||||
p_value
|
p_value
|
||||||
)]
|
)]
|
||||||
|
|
||||||
|
|
@ -249,19 +252,18 @@ server <- function(options) {
|
||||||
"Term",
|
"Term",
|
||||||
"Total ratio",
|
"Total ratio",
|
||||||
"Query ratio",
|
"Query ratio",
|
||||||
|
"Increase",
|
||||||
"p-value"
|
"p-value"
|
||||||
),
|
),
|
||||||
options = list(
|
options = list(
|
||||||
pageLength = 25
|
pageLength = 25
|
||||||
)
|
)
|
||||||
)
|
) |>
|
||||||
|
DT::formatRound("p_value", digits = 4) |>
|
||||||
dt <- DT::formatRound(dt, "p_value", digits = 4)
|
DT::formatPercentage(
|
||||||
dt <- DT::formatPercentage(
|
c("total_ratio", "query_ratio", "increase"),
|
||||||
dt,
|
digits = 2
|
||||||
c("total_ratio", "query_ratio"),
|
)
|
||||||
digits = 1
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue