Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (29 sloc) 721 Bytes
---
title: "Pin Track"
---
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".
```{r}
suppressPackageStartupMessages({
library(TnT)
library(GenomicFeatures)
})
set.seed(42)
```
## Basic Example
Construct the data.
```{r}
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.
```{r}
ptrack <- TnT::PinTrack(gpos, value = gpos$score, domain = c(0, 1), color = c("yellow", "blue", "red"))
TnTBoard(ptrack, GRanges("chr12", IRanges(1, 1200)))
```
<br/> <br/>
## Session Info
```{r}
sessionInfo()
```