Description Usage Arguments Examples
View source: R/plotGInteractions.R
plot graph for GInteractions
1 | plotGInteractions(gi, range, feature.gr, ...)
|
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. |
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.