partitionRanges | R Documentation |
Partition a set of Genomic Ranges by another
partitionRanges(x, y, ...)
## S4 method for signature 'GRanges,GRanges'
partitionRanges(
x,
y,
y_as_both = TRUE,
ignore.strand = FALSE,
simplify = TRUE,
suffix = c(".x", ".y"),
...
)
x , y |
GenomicRanges objects |
... |
Not used |
y_as_both |
logical(1) If there are any unstranded regions in y, should these be assigned to both strands. If TRUE unstranded regions can be used to partition stranded regions |
ignore.strand |
If set to TRUE, then the strand of x and y is set to "*" prior to any computation. |
simplify |
Pass to chopMC and simplify mcols in the output |
suffix |
Added to any shared column names in the provided objects |
The query set of ranges can be broken in regions which strictly overlap a second set of ranges. The complete set of mcols from both initial objects will included in the set of partitioned ranges
A GRanges object
x <- GRanges(c("chr1:1-10", "chr1:6-15"))
x$id <- paste0("range", seq_along(x))
x
y <- GRanges(c("chr1:2-5", "chr1:6-12"))
y$id <- paste0("range", seq_along(y))
y
partitionRanges(x, y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.