mirror of
https://github.com/johrpan/ubigen.git
synced 2025-10-26 19:57:24 +01:00
Initial commit
This commit is contained in:
commit
be1a4ef2fd
12 changed files with 825 additions and 0 deletions
41
R/server.R
Normal file
41
R/server.R
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#' Server implementing the main user interface.
|
||||
#' @noRd
|
||||
server <- function(input, output) {
|
||||
output$all_data <- DT::renderDataTable({
|
||||
data <- ubigen::genes[, .(
|
||||
"Gene" = glue::glue_data(
|
||||
ubigen::genes,
|
||||
"<a href=\"https://www.ensembl.org/Homo_sapiens/Gene/Summary",
|
||||
"?db=core;g={gene}\" target=\"_blank\">{hgnc_name}</a>"
|
||||
),
|
||||
"Rank" = rank,
|
||||
"Score" = score,
|
||||
"Median" = median_expression,
|
||||
"Mean" = mean_expression,
|
||||
"Standard deviation" = sd_expression,
|
||||
"Expressed" = above_zero,
|
||||
"Above 50 TPM" = above_threshold,
|
||||
"Above median" = above_median,
|
||||
"Above 95%" = above_95
|
||||
)]
|
||||
|
||||
DT::datatable(
|
||||
data,
|
||||
options = list(pageLength = 100),
|
||||
rownames = FALSE,
|
||||
escape = FALSE
|
||||
) |>
|
||||
DT::formatPercentage(c(
|
||||
"Score",
|
||||
"Expressed",
|
||||
"Above 50 TPM",
|
||||
"Above median",
|
||||
"Above 95%"
|
||||
)) |>
|
||||
DT::formatRound(c(
|
||||
"Median",
|
||||
"Mean",
|
||||
"Standard deviation"
|
||||
))
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue