This function is only provided for users who are familiar with the concept of htmlwidgets-package. It explicitly convets a TnTBoard or TnTGenome object to a htmlwidget object. You do not need it in most cases.

trackWidget(tntdef, elementId = NULL)

Arguments

tntdef

A TnTBoard/TnTGenome object or a htmlwidget object. If it is a htmlwidget object, the function will return it as is.

elementId

An id for the htmlwidget (random by default).

Value

The function returns a htmlwidget object.

Examples

b <- TnTBoard(BlockTrack(GRanges("chr12", IRanges(1, 123)))) widget <- trackWidget(b)
#> - Missing argument `view.range`: #> automatically select -14..138 on seqlevel chr12...
#> - Missing argument `coord.range` and seqlength is unknown: #> automatically set coordinate limit to -25..149 ...
class(widget)
#> [1] "trackWidget" "htmlwidget"
identical(widget, trackWidget(widget))
#> [1] TRUE