A block track can be created from a GRanges or IRanges object, showing the coverage of a Range-like object.
suppressPackageStartupMessages({ library(TnT) library(GenomicFeatures) }) set.seed(42)
Construct a IRanges object and a GRanges object.
ir <- IRanges(start = c(69, 420, 6942), width = c(10, 100, 1000)) gr <- GRanges("chr12", ir)
To construct the track and create the visualization.
btrack <- TnT::BlockTrack(gr, tooltip = as.data.frame(gr), label = "My GRanges", color = "yellow") TnT::TnTBoard(btrack, range(gr))
sessionInfo()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.