Learn R Programming

diffloop (version 1.0.2)

slidingWindowTest: Combined association test for all loops in a defined region

Description

slidingWindowTest takes a loops object and integer values of the association window and the distance between consecutive windows.

Usage

slidingWindowTest(x, window, step)

## S3 method for class 'loops,numeric,numeric': slidingWindowTest(x, window, step)

Arguments

x
A loops object with PValue column (from association testing)
window
The length a window will be for combined association
step
The size that the window will shift for each association

Value

  • A data.frame sorted by FDR

Details

This function returns a data.frame sorted by FDR of each region. The engine loops over each chromosome and defines the first window at the left-most loop and slides the window right until no more loops are present in x Each region is determined from a sliding window of fixed length. The combined significance measure per feature is computed via the Simes method for intrachromosomal loops where at least one anchor from the loop overlaps with the region. Requires PValue column in the rowData slot.

Examples

Run this code
# Sliding window test 100kb at a time between naive and jurkat
rda<-paste(system.file('rda',package='diffloop'),'loops.small.rda',sep='/')
load(rda)
jpn_loopfit <- loopFit(loops.small)
# Differential loop calling between naive and jurkat
assoc_jn <- loopTest(jpn_loopfit, coef = 2)
sw_jn <- slidingWindowTest(assoc_jn, 100000, 100000)

Run the code above in your browser using DataLab