getCisPairs: Build a 'GInteractions' object with all pairs of input...

Description Usage Arguments Value Examples

View source: R/interaction.R

Description

Distance is calculated from the center of input regions.

Usage

1
getCisPairs(inGR, maxDist = 1e+06)

Arguments

inGR

GRanges object of genomic regions. The ranges should be sorted according to chr, strand, and start position. Use sort to sort it.

maxDist

maximal distance in base-pairs between pairs of ranges as single numeric value.

Value

A GInteractions object with all pairs within the given distance.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# 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)

# The input regions are accessibly via regions()
regions(gi)

sevenC documentation built on Nov. 8, 2020, 5:35 p.m.