combineClusters {CAGEfightR} | R Documentation |
This function can safely combine two CAGE experiments, for example TCs and enhancers, for later analysis, by making sure no ranges in the final object are overlapping.
combineClusters(object1, object2, ...) ## S4 method for signature ## 'RangedSummarizedExperiment,RangedSummarizedExperiment' combineClusters(object1, object2, removeIfOverlapping = "none")
object1 |
RangedSummarizedExperiment: First experiment to be combined. |
object2 |
RangedSummarizedExperiment: First experiment to be combined. |
... |
arguments passed to methods. |
removeIfOverlapping |
character: Whether to keep overlapping ranges ('none') or discard from either the first ('object1') or second ('object2') experiment. |
RangedSummarizedExperiment with merged and sorted ranges (colData and metadata are carried over unchanged).
data(exampleUnidirectional) data(exampleBidirectional) # Clusters must have identical colData to be combined: exampleUnidirectional$totalTags <- NULL # Combine, keeping potential overlaps combineClusters(object1=exampleUnidirectional, object2=exampleBidirectional) # If features overlap, keep only from object1 combineClusters(object1=exampleUnidirectional, object2=exampleBidirectional, removeIfOverlapping='object2') # If features overlap, keep only from object2 combineClusters(object1=exampleUnidirectional, object2=exampleBidirectional, removeIfOverlapping='object1')