cleanFeatureSets: Clean feature sets

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Clean feature sets within a IndexedRelations object.

Usage

1

Arguments

x

An IndexedRelations object.

Details

This function will sort and remove duplicates within each feature set. This provides some structure that can be useful in some algorithms, e.g., ordering of partner indices reflects the ordering of the partner features.

Value

An IndexedRelations object with unique and sorted feature sets.

Author(s)

Aaron Lun

See Also

standardizeFeatureSets, to do the same thing with clean=TRUE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(GenomicRanges)
promoters <- GRanges("chrA", IRanges(1:10*20, 1:10*20+10))
enhancers <- GRanges("chrA", IRanges(1:20*10, 1:20*10+10))
partner1 <- sample(length(promoters), 100, replace=TRUE)
partner2 <- sample(length(enhancers), 100, replace=TRUE)

rel <- IndexedRelations(
    list(promoter=partner1, enhancer=partner2),
    featureSets=list(promoters=promoters, enhancers=enhancers)
)
rel <- cleanFeatureSets(rel)

featureSets(rel)[[1]]
featureSets(rel)[[2]]

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