A Pin track can be created from a width-one GRanges that represents the genomic position and a numeric vector representing height of each "pin".

suppressPackageStartupMessages({
    library(TnT)
    library(GenomicFeatures)
})
set.seed(42)

Basic Example

Construct the data.

ir <- IRanges(start = c(10, 100, 1000), width = 1)
gpos <- GRanges("chr12", ir)
gpos$score <- c(0.1, 0.5, 1)

To construct the track and create the visualization.

ptrack <- TnT::PinTrack(gpos, value = gpos$score, domain = c(0, 1), color = c("yellow", "blue", "red"))
TnTBoard(ptrack, GRanges("chr12", IRanges(1, 1200)))



Session Info

sessionInfo()


Marlin-Na/TnT documentation built on Jan. 31, 2020, 7:43 a.m.