plotGInteractions: plot GInteractions

Description Usage Arguments Examples

View source: R/plotGInteractions.R

Description

plot graph for GInteractions

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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)

trackViewer documentation built on Feb. 11, 2021, 2 a.m.