plotGInteractions {trackViewer} | R Documentation

## plot GInteractions

### Description

plot graph for GInteractions

### Usage

    plotGInteractions(gi, range, feature.gr, ...)

### Arguments

`gi` | an object of GInteractions
`range` | the region to plot. an object of GRanges
`feature.gr` | the feature.gr to be added. an object of GRanges
`...` | Not used.

### Examples

    library(InteractionSet)
    gi <- readRDS(system.file("extdata", "gi.rds", package="trackViewer"))
    range <- GRanges("chr2", IRanges(234500000, 235000000))
    library(TxDb.Hsapiens.UCSC.hg19.knownGene)
    feature.gr <- genes(TxDb.Hsapiens.UCSC.hg19.knownGene)
    feature.gr <- subsetByOverlaps(feature.gr, regions(gi))
    feature.gr$col <- sample(1:7, length(feature.gr), replace=TRUE)
    feature.gr$type <- sample(c("promoter", "enhancer", "gene"),
                             length(feature.gr), replace=TRUE,
                             prob=c(0.1, 0.2, 0.7))
    plotGInteractions(gi, range, feature.gr)

[Package trackViewer version 1.26.2 Index]