getCisPairs {sevenC} | R Documentation

## Build a `GInteractions` object with all pairs of input `GRanges` within a given distance.

### Description

Distance is calculated from the center of input regions.

### Usage

    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

    # 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)

[Package sevenC version 1.4.0 Index]