Nothing
library(shiny)
library(NGLVieweR)
ui = fluidPage(
titlePanel("Viewer with API inputs"),
sidebarLayout(
sidebarPanel(
actionButton("show", "Show"),
actionButton("hide", "Hide"),
),
mainPanel(
NGLVieweROutput("structure")
)
)
)
server = function(input, output) {
output$structure <- renderNGLVieweR({
NGLVieweR("7CID") %>%
addRepresentation("cartoon", param = list(name = "cartoon", color="residueindex"))
})
observeEvent(input$show, {
NGLVieweR_proxy("structure") %>%
updateVisibility("cartoon", value = TRUE)
})
observeEvent(input$hide, {
NGLVieweR_proxy("structure") %>%
updateVisibility("cartoon", value = FALSE)
})
}
shinyApp(ui, server)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.