GInteractions
object with all pairs of input
GRanges
within a given distance.R/interaction.R
getCisPairs.Rd
Distance is calculated from the center of input regions.
getCisPairs(inGR, maxDist = 1e+06)
inGR |
|
---|---|
maxDist | maximal distance in base-pairs between pairs of ranges as single numeric value. |
A GInteractions
object with all pairs
within the given distance.
# build example GRanges as input inGR <- GRanges( rep("chr1", 5), IRanges( c(10, 20, 30, 100, 1000), c(15, 25, 35, 105, 1005) ) ) # get all pairs within 50 bp gi <- getCisPairs(inGR, maxDist = 50) # getCisPiars returns a StrictGInteractions object class(gi)#> [1] "StrictGInteractions" #> attr(,"package") #> [1] "InteractionSet"# The input regions are accessibly via regions() regions(gi)#> GRanges object with 5 ranges and 0 metadata columns: #> seqnames ranges strand #> <Rle> <IRanges> <Rle> #> [1] chr1 10-15 * #> [2] chr1 20-25 * #> [3] chr1 30-35 * #> [4] chr1 100-105 * #> [5] chr1 1000-1005 * #> ------- #> seqinfo: 1 sequence from an unspecified genome; no seqlengths