Skip to content

Commit 9fa717c

Browse files
committed
added last requested features
1 parent 40c639f commit 9fa717c

3 files changed

Lines changed: 19 additions & 11 deletions

File tree

.Rhistory

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
runApp()
2-
runApp()
3-
runApp()
4-
runApp()
5-
?geom_text
61
?geom_text_repel
72
runApp()
83
runApp()
@@ -510,3 +505,8 @@ runApp()
510505
runApp()
511506
runApp()
512507
runApp()
508+
shiny::runApp()
509+
shiny::runApp()
510+
shiny::runApp()
511+
runApp()
512+
runApp()

SendRetrieve.R

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,14 @@ sendRetrieveUI <- function(id, prefix="") {
5454
hr(style="border:solid;border-width:1px;"),
5555
hidden(fluidRow(id = ns("app_c4"),
5656
column(3,
57-
actionButton(ns("send_stringdb"), "Send (filtered) features to stringDB")),
57+
actionButton(ns("send_stringdb"), "Send selected features to stringDB")),
5858
column(1, actionBttn(ns("h_stringdb"),
5959
icon = icon("info-circle"), # Info button for app analysis help
6060
style = "pill",
6161
color = "royal", size = "xs")
6262
),
6363
column(3,
64+
actionButton(ns("select_table"), "Select all (filtered) features"),
6465
actionButton(ns("reset_table"), "Deselect all features")),
6566
column(1, actionBttn(ns("h_select"),
6667
icon = icon("info-circle"), # Info button for app analysis help
@@ -234,7 +235,7 @@ sendRetrieveServer <- function(id, preProcessing, log_operations, SM) {
234235
backgroundColor = 'lightcoral'
235236
)
236237
}
237-
})
238+
}, server = TRUE)
238239

239240
# log filters
240241
observeEvent(input$rtable_search, {
@@ -304,10 +305,14 @@ sendRetrieveServer <- function(id, preProcessing, log_operations, SM) {
304305
observeEvent(input$reset_table, {
305306
# Deselect all features in table
306307
selectRows(dproxy, NULL)
307-
}
308-
)
309-
308+
})
310309

310+
observeEvent(input$select_table, {
311+
# select all filtered features
312+
313+
print(paste("Selected", length(input$rtable_rows_all), "rows"))
314+
selectRows(dproxy, input$rtable_rows_all)
315+
})
311316

312317
# ## Show the processed table in a DataTable
313318
# output$rtable <- DT::renderDT({
@@ -401,6 +406,7 @@ sendRetrieveServer <- function(id, preProcessing, log_operations, SM) {
401406
tdata <- cbind(tdata, suppressWarnings(
402407
as.numeric(input$VSClust_results[[1]][[n]])))
403408
}
409+
tdata <- as.data.frame(tdata, stringsAsFactors = FALSE)
404410
# tdata <- data.frame(tdata)
405411
colnames(tdata) <- names(input$VSClust_results[[1]]) # Assign column names
406412

@@ -414,6 +420,7 @@ sendRetrieveServer <- function(id, preProcessing, log_operations, SM) {
414420
}
415421
colnames(tdata) <- paste("VSClust", colnames(tdata), sep = "_") # Add prefix to column names
416422
tdata[,"VSClust_isClusterMember"] <- as.logical(tdata[,"VSClust_isClusterMember"]) # Convert to logical
423+
tdata[, "VSClust_cluster"] <- as.factor(tdata[, "VSClust_cluster"]) # Convert to integer
417424
result_table(data.frame(result_table(), tdata)) # Combine results with processed table
418425
# Update the log with processed results
419426
tlog <- log_operations()
@@ -480,6 +487,7 @@ sendRetrieveServer <- function(id, preProcessing, log_operations, SM) {
480487
tdata <- cbind(tdata, suppressWarnings(
481488
as.numeric(input$PolySTest_results[[1]][[n]])))
482489
}
490+
tdata <- as.data.frame(tdata, stringsAsFactors = FALSE)
483491
colnames(tdata) <- names(input$PolySTest_results[[1]]) # Assign column names
484492

485493
# check whther this is PolySTest output

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.13
1+
1.1.14

0 commit comments

Comments
 (0)