ConsensusLoops.Rd
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
ConsensusLoops(loop_ranges, stringency = 1, overlap_threshold = 1, split_anchors = FALSE, resolutions = NULL, keep_all = FALSE)
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) |
A 'LoopRanges' class object for the consensus loops
# 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)#> $Consensus #> GRangesList object of length 2: #> $Anchor 1 #> GRanges object with 66 ranges and 0 metadata columns: #> seqnames ranges strand #> <Rle> <IRanges> <Rle> #> [1] chr5 67575828-67585828 * #> [2] chr5 139929585-139939585 * #> [3] chrX 106893230-106903230 * #> [4] chr12 58183783-58193783 * #> [5] chr12 56893784-56903784 * #> ... ... ... ... #> [62] chr5 55775827-55785827 * #> [63] chr6 53434798-53444798 * #> [64] chr15 25575147-25585147 * #> [65] chr1 178789135-178799135 * #> [66] chr13 42234136-42244136 * #> #> ... #> <1 more element> #> ------- #> seqinfo: 23 sequences from an unspecified genome; no seqlengths #> #> attr(,"class") #> [1] "LoopRanges"