Learn R Programming

diffloop (version 1.0.2)

loopPlot: Visualize looping

Description

loopPlot takes a loops object and a GRanges objectand shows all loops in region (where both anchors are present)

Usage

loopPlot(x, y, organism = "h", geneinfo = "NA", colorLoops = FALSE,
  cache = TRUE)

## S3 method for class 'loops,GRanges': loopPlot(x, y, organism = "h", geneinfo = "NA", colorLoops = FALSE, cache = TRUE)

Arguments

x
A loops object
y
A GRanges object containing region of interest
organism
'h' for human or 'm' for mouse supported
geneinfo
A data.frame manually specifying annotation (see Examples)
colorLoops
Differentiates loops based on loop.type in loops object
cache
logic variable (default = TRUE) to use gene annotation from July.2015 freeze

Value

  • A plot object

Details

Basic plot function shows the looping in each sample. The intensity of the color is proportional to the number of counts observed for the particular loop relative to the other loops in the entire plot. If colorLoops is specified at TRUE, then the x object must be loops and it must have a loop.type column which can be generated from the annotateLoops function. Blue loops are CTCF loops; black are none; red are enhancer-promoter loops.

Examples

Run this code
# Print loops in region chr1:36000000-36300000
library(GenomicRanges)
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
regA <- GRanges(c('1'),IRanges(start=c(36000000),end=c(36300000)))
plot1 <- subsetRegion(loops.small, regA)
#Example of \\code{geneinfo} table
geneinfo <- data.frame(1,359345,359681,'RP5-8572K21.15','.',-1)
names(geneinfo) <- c('chrom','start','stop','gene','strand')

Run the code above in your browser using DataLab