diff --git a/DESCRIPTION b/DESCRIPTION index 8945db0f..30e4c325 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: PhyloProfile -Version: 1.99.0 -Date: 2024-12-17 +Version: 1.99.1 +Date: 2024-12-20 Title: PhyloProfile Authors@R: c( person("Vinh", "Tran", role = c("aut", "cre"), email = "tran@bio.uni-frankfurt.de", comment=c(ORCID="0000-0001-6772-7595")), diff --git a/inst/PhyloProfile/server.R b/inst/PhyloProfile/server.R index bb1e9eb4..7e04eca7 100644 --- a/inst/PhyloProfile/server.R +++ b/inst/PhyloProfile/server.R @@ -4056,6 +4056,29 @@ shinyServer(function(input, output, session) { paste(a, s, b, c, d, e, sep = "\n") } }) + + # * update highlight gene/taxa by selected point --------------------------- + observe({ + input$highlightMain + # GET INFO BASED ON CURRENT TAB + if (input$tabs == "Main profile") { + shinyjs::enable("highlightMain") + # info contains groupID,orthoID,supertaxon,mVar1,%spec,var2 + info <- isolate(mainpointInfo()) + } else if (input$tabs == "Customized profile") { + shinyjs::disable("highlightMain") + info <- NULL + } + req(info) + if (length(info) > 1) { + updateSelectizeInput( + session, "geneHighlight", selected = info[[1]][1] + ) + updateSelectizeInput( + session, "taxonHighlight", selected = info[[4]][1] + ) + } + }) # ============================= DETAILED PLOT ============================== # * data for detailed plot ------------------------------------------------- diff --git a/inst/PhyloProfile/ui.R b/inst/PhyloProfile/ui.R index e0da44b0..e879c588 100644 --- a/inst/PhyloProfile/ui.R +++ b/inst/PhyloProfile/ui.R @@ -2461,6 +2461,12 @@ shinyUI( "Domain plot", style = "success", disabled = TRUE + ), + shinyBS::bsButton( + "highlightMain", + "Highlight", + style = "success", + disabled = FALSE ) ), style = "opacity: 0.80"