swapAnchors: Swap anchor regions

Description Usage Arguments Details Value Author(s) Examples

Description

Swap anchor regions within an interaction to ensure that the first anchor is not greater than the second.

Usage

1
2
3
## S4 method for signature 'GenomicInteractions'
swapAnchors(x, mode = c("order",
  "reverse", "all"))

Arguments

x

A GenomicInteractions object.

mode

String specifying the type of swapping to perform.

Details

mode="order" will ensure that the first anchor region is not ordered above the second anchor in the output object.

mode="reverse" will ensure that the first anchor region is not ordered below the second anchor in the output.

mode="all" will simply swap the first and second anchor regions without any consideration of ordering.

Value

A GenomicInteractions object with some or all of first and second anchor regions swapped.

Author(s)

Aaron Lun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
anchor1 <- GRanges(c("chr1", "chr1", "chr2", "chr1"), 
    IRanges(c(10, 20, 30, 20), width=5))
anchor2 <- GRanges(c("chr1", "chr1", "chr1", "chr2"), 
    IRanges(c(5, 50, 3, 50), width=5))
test <- GenomicInteractions(anchor1, anchor2)
test

swapAnchors(test)
swapAnchors(test, mode="reverse")
swapAnchors(test, mode="all")

LTLA/GenomicInteractions documentation built on June 24, 2019, 2:09 p.m.