Two or more arbitrary tracks can be used to create a composite track, by which different features can be shown in the same track.
# S4 method for TnTTrack,TnTTrack merge(x, y, ...) # S4 method for TnTTrack,missing merge(x, y, ...)
x, y, ... | Track constructed with track-constructors or composite track. |
---|
Returns a "CompositeTrack" object.
gr <- GRanges("chr1", IRanges(c(11000, 20000, 60000), width = 2000)) gpos <- GRanges("chr1", IRanges(c(12000, 21000, 61000), width = 1), value = c(1, 2, 3)) btrack <- BlockTrack(gr, label = "Block Track", tooltip = as.data.frame(gr), color = "lightblue4") ptrack <- PinTrack(gpos, label = "Pin Track", tooltip = as.data.frame(gpos), background = "beige") ctrack <- merge(btrack, ptrack)# NOT RUN { TnTBoard(ctrack) # }