rearrangePartners: Rearrange partners

Description Usage Arguments Details Value Author(s) Examples

Description

Rearrange partners in an IndexedRelations object.

Usage

1

Arguments

x

An IndexedRelations object.

perm

An integer vector specifying the permutation of the partners.

Details

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.

Value

An IndexedRelations object with rearranged partners.

Author(s)

Aaron Lun

Examples

 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)

LTLA/IndexedRelations documentation built on June 2, 2019, 10:03 p.m.