Description Usage Arguments Value See Also Examples
Swap out the range of a GRanges-object with another IRanges-object stored inside the same object. I.e., swapping cluster widths with cluster peaks.
1 2 3 4 5 6 7  | swapRanges(object, ...)
## S4 method for signature 'GenomicRanges'
swapRanges(object, inputColumn = "thick", outputColumn = NULL)
## S4 method for signature 'RangedSummarizedExperiment'
swapRanges(object, ...)
 | 
object | 
 GRanges or RangedSummarizedExperiment: Primary ranges to be swapped out.  | 
... | 
 additional arguments passed to methods.  | 
inputColumn | 
 character: Name of column holding IRanges to be swapped in.  | 
outputColumn | 
 character or NULL: Name of column to hold swapped out ranges, if NULL original ranges are not saved.  | 
GRanges with inputColumn swapped in as ranges.
Other Swapping functions: 
swapScores()
1 2 3 4 5 6 7 8 9 10 11 12 13  | data(exampleUnidirectional)
gr <- rowRanges(exampleUnidirectional)
# Swap in peaks as main ranges
peaks <- swapRanges(gr)
head(width(gr))
head(width(peaks))
# swapRanges() can also be directly called on a RangedSummarizedExperiment:
swapRanges(exampleUnidirectional)
# The original can optionally be saved in the output object
swapRanges(gr, outputColumn = 'swapped')
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.