mirror of
https://github.com/johrpan/geposanui.git
synced 2025-10-26 11:17:24 +01:00
Add buttons to copy results
This commit is contained in:
parent
686af3f44b
commit
ae0643741a
2 changed files with 34 additions and 0 deletions
28
server.R
28
server.R
|
|
@ -2,6 +2,7 @@ library(data.table)
|
|||
library(DT)
|
||||
library(gprofiler2)
|
||||
library(plotly)
|
||||
library(rclipboard)
|
||||
library(shiny)
|
||||
|
||||
source("init.R")
|
||||
|
|
@ -100,6 +101,33 @@ server <- function(input, output) {
|
|||
)
|
||||
})
|
||||
|
||||
output$copy <- renderUI({
|
||||
results <- results()
|
||||
|
||||
gene_ids <- results[, gene]
|
||||
names <- results[name != "", name]
|
||||
|
||||
genes_text <- paste(gene_ids, collapse = "\n")
|
||||
names_text <- paste(names, collapse = "\n")
|
||||
|
||||
splitLayout(
|
||||
rclipButton(
|
||||
"copy_ids_button",
|
||||
"Copy gene IDs",
|
||||
genes_text,
|
||||
icon = icon("clipboard"),
|
||||
width = "100%"
|
||||
),
|
||||
rclipButton(
|
||||
"copy_names_button",
|
||||
"Copy gene names",
|
||||
names_text,
|
||||
icon = icon("clipboard"),
|
||||
width = "100%"
|
||||
)
|
||||
)
|
||||
})
|
||||
|
||||
output$scatter <- renderPlot({
|
||||
results <- results()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue