Description Usage Arguments Details Value Author(s) Examples
Rearrange partners in an IndexedRelations object.
1 | rearrangePartners(x, perm)
|
x |
An IndexedRelations object. |
perm |
An integer vector specifying the permutation of the partners. |
This function facilitates the task of switching the order of partners across all relationships in x
.
Note that the length of perm
need not be the as ncol(partners(x))
;
partners can be dropped, duplicated, etc.
An IndexedRelations object with rearranged partners.
Aaron Lun
1 2 3 4 5 6 7 8 9 10 | library(GenomicRanges)
genomic <- GRanges("chrA", IRanges(1:10*20, 1:10*20+10))
intervals <- IRanges(1:20*10, 1:20*10+10)
rel <- IndexedRelations(list(1:2, 1:2), list(genomic, intervals))
rearrangePartners(rel, c(2, 1))
# Or even drop a partner completely:
rearrangePartners(rel, 2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.