ConsensusLoops: Subset an object of class LoopRanges using consensus options

Description Usage Arguments Value Examples

View source: R/ConsensusLoops.R

Description

Performs filtering on looping data in LoopRanges objects based on custom parameters and returns a single GRangesList object indicating one looping dataset with two anchors

Usage

1
2
ConsensusLoops(loop_ranges, stringency = 1, overlap_threshold = 1,
  split_anchors = FALSE, resolutions = NULL, keep_all = FALSE)

Arguments

loop_ranges

An object of 'LoopRanges' class created from the LoopsToRanges() function

stringency

Integer (n>=0) indicating the number of looping datasets a loop from a given dataset must overlap with to be considered a consensus loop

overlap_threshold

Single numerical input in either percentage (0<=n<=1) overlap format if split_anchors = TRUE, or in base pair number format (n>=0) in split_anchors=FALSE (default=1)

split_anchors

A boolean (TRUE/FALSE) that determines if the different loop anchor sizes are considered together (default=TRUE) or separately (FALSE)

resolutions

An optional numerical vector of anchor sizes - to be used only when split_anchors=TRUE

keep_all

If TRUE, keeps all of the loops (concatenation of looping datasets)

Value

A 'LoopRanges' class object for the consensus loops

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load loops into LoopRanges object 
ovary_loops <- system.file("extdata/loops", "ovary_hg19.bedpe", 
package = "LoopRig", mustWork = TRUE) 
spleen_loops <- system.file("extdata/loops", "spleen_hg19.bedpe", 
package = "LoopRig", mustWork = TRUE)
pancreas_loops <- system.file("extdata/loops", "pancreas_hg19.bedpe", 
package = "LoopRig", mustWork = TRUE)
loops <- LoopsToRanges(ovary_loops, spleen_loops, pancreas_loops, custom_cols = 0)

# Determine consensus loops based on overlap of 1 bp in at least 2 datasets
ConsensusLoops(loops, stringency = 2, overlap_threshold = 1)

LoopRig documentation built on Jan. 11, 2020, 9:27 a.m.