trackLinks: Create a genome browser track of links.

Description Usage Arguments Value See Also Examples

View source: R/track.R

Description

Create a Gviz-track of links (e.g. between TSSs and enhancers), where arches connect the different pairs of clusters. The height of arches can be set to scale the strength of the interaction (for example indicating higher correlation). This function is a thin wrapper around the InteractionTrack-class from the GenomicInteractions package. Currently, only scaling arch height by p-value is supported.

Usage

1
trackLinks(object, ...)

Arguments

object

GInteractions: Links or pairs between clusters.

...

additional arguments passed to InteractionTrack via displayPars.

Value

InteractionTrack-object from the GenomicInteractions package.

See Also

Other Genome Browser functions: trackBalance(), trackCTSS(), trackClusters()

Other Spatial functions: findLinks(), findStretches()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(InteractionSet)
library(Gviz)
library(GenomicInteractions)

# Links between highly expressed unidirectional clusters
TCs <- subset(exampleUnidirectional, score > 10)
TC_links <- findLinks(TCs, inputAssay="counts", maxDist=10000L)
link_track <- trackLinks(TC_links, name="TSS links", interaction.measure="p.value")

# Plot region
plot_region <- GRanges(seqnames="chr18",
                       ranges = IRanges(start=start(anchors(TC_links[1],
                                                            "first")),
                                        end=end(anchors(TC_links[1],
                                                        "second"))))
# Plot using Gviz
plotTracks(link_track,
           from=start(plot_region),
           to=end(plot_region),
           chromosome = as.character(seqnames(plot_region)))
# See vignette for examples on how to combine multiple Gviz tracks

MalteThodberg/CAGEfightR documentation built on Sept. 11, 2021, 4:42 a.m.