partitionRanges-methods: Partition a set of Genomic Ranges

partitionRangesR Documentation

Partition a set of Genomic Ranges

Description

Partition a set of Genomic Ranges by another

Usage

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"),
  ...
)

Arguments

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

Details

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

Value

A GRanges object

Examples

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)


steveped/chipExtra documentation built on Aug. 1, 2024, 12:33 a.m.