main_server.RdShiny outer module to integrate draw and annotation inner modules
main_server(id, phylogeny, draw_modules, anno_module = FALSE) main_ui(id, phylogeny, draw_modules, anno_module = FALSE)
| id | character, namespace id |
|---|---|
| phylogeny | object of class |
| draw_modules | character. Modules to include in the tree-drawing application (or page).
The modules are specified through their Initial as given in |
| anno_module | logical. Whether to include the 'clade_annotation' module ( |
UI and server logic for plotting and interactive modification of a phylogeny
Trees with > 200 tips will in most cases be illegible. Tip names become illegible in smaller trees.
if (interactive()) { library(shiny) library(phynotate) library(ape) ui <- shiny::navbarPage( title = "A shiny app where we need to include a page for phylogeny viz", tabPanel(title = "Download sequences"), tabPanel(title = "Infer orthology"), tabPanel( title = "Vizualize and download trees", phynotate::main_ui( id = "id", draw_modules = "LPTB", anno_module = FALSE ) ) ) server <- function(input, output, session) { # Server code to download sequences # Server code to infer orthology # Send a user selected tree to the phynotate viz module main_server(id = "id", phylogeny = ape::rcoal(20), #phylogeny = input[["user_selected_tree"]], draw_modules = "LPTB") } shinyApp(ui = ui, server = server) }