Description Usage Arguments Details Value Author(s) Examples
Swap anchor regions within an interaction to ensure that the first anchor is not greater than the second.
1 2 3 | ## S4 method for signature 'GenomicInteractions'
swapAnchors(x, mode = c("order",
"reverse", "all"))
|
x |
A GenomicInteractions object. |
mode |
String specifying the type of swapping to perform. |
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.
A GenomicInteractions object with some or all of first and second anchor regions swapped.
Aaron Lun
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.