trackLinks {CAGEfightR} | R Documentation

## Create a genome browser track of links.

### 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

    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

    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

[Package CAGEfightR version 1.6.0 Index]