Learn R Programming

diffloop (version 1.0.2)

plotTopLoops: Plot the most significant loops

Description

plotTopLoops takes a loops object and creates a time-stamped .pdf file with loop plots (one per page) of the top loops.

Usage

plotTopLoops(lto, n = 0, PValue = 1, FDR = 1, organism = "h",
  colorLoops = FALSE)

## S3 method for class 'loops': plotTopLoops(lto, n = 0, PValue = 1, FDR = 1, organism = "h", colorLoops = FALSE)

Arguments

lto
loops object
n
number of loops to print (can remain 0 to specify from other parameters) determined by PValue
PValue
Maximum pvalue threshold for loop inclusion when printing loop plot
FDR
False discovery rate threshold for inclusion
organism
Either 'm' for mouse or 'h' for human.
colorLoops
Default FALSE; specify true if rowData slot contains loop.type from annotateLoops to visualize plots with varying colors for CTCF looping and enhancer-promoter looping

Value

  • Prints a time stamped .pdf file of top loops

Details

Each plot will show the region +/- 1 loopwidth of the loop with annotation specified for either human or mouse. Assumes columns Pvalue and FDR are specified in the loops object. We recommend removing self loops before using this function (and in reality, before any association testing was called.)

Examples

Run this code
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
jpn.u <- removeSelfLoops(loops.small)
jpn_loopfit <- loopFit(jpn.u)
assoc_jn <- loopTest(jpn_loopfit, coef = 2)
plotTopLoops(assoc_jn, n=2)

Run the code above in your browser using DataLab