@@ -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
0 commit comments