TnT-shiny: Shiny bindings for TnT

Description Usage Arguments Value Examples

Description

Output and render functions for using TnT within Shiny applications and interactive Rmd documents.

Usage

1
2
3
TnTOutput(outputId, width = "100%", height = "auto")

renderTnT(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like '100%', '400px', 'auto') or a number, which will be coerced to a string and have 'px' appended.

expr

An expression that generates a TnTBoard/TnTGenome object.

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.

Value

An output or render function that enables the use of the converted htmlwidget within Shiny applications.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(shiny)

ui <- fluidPage(fluidRow(
    column(width = 2, {
        "A Simple Example Here"
    }),
    column(width = 10, {
        TnTOutput("out")
    })
))
server <- function (input, output) {
    re.btrack <- reactive({
        gr <- GRanges("chr12", IRanges(100, 1000))
        BlockTrack(gr)
    })
    output$out <- renderTnT({
        TnTBoard(re.btrack())
    })
}
## Not run: 
shinyApp(ui = ui, server = server)

## End(Not run)

TnT documentation built on Nov. 8, 2020, 8:11 p.m.