subsetbyRangeOverlap {profileplyr} | R Documentation

## Subset ranges based on overlap with a GRanges object

### Description

The ranges from the deepTools matrix will be subset based on whether they overlap with user defined ranges

### Usage

    subsetbyRangeOverlap(object, group, GRanges_names = NULL,
      include_nonoverlapping = FALSE, separateDuplicated = TRUE,
      inherit_groups = FALSE)

### Arguments

`object` | A profileplyr object
`group` | The regions by which to subset the deepTools matrix. This must be either a single GRanges object, or a GRangesList. Combinations of bed file paths and GRanges objects are not accepted, Import BED files as GRanges with rtracklayer import.bed() function.
`GRanges_names` | The names of the GRanges that were used for the "GRanges" argument. This will be used to label these groups in the construction of the resulting profileplyr object.
`include_nonoverlapping` | A logical argument, if FALSE the regions from the original deepTools matrix that do not overlap with the user defined regions will be left out of the returned profileplyr object.
`separateDuplicated` | A logical argument, if TRUE then regions that overlap multiple inputs to 'GRanges' argument will be separated and made into their own group. All possible combinations of region overlaps will be tested, so it is not recommended to have more than 3 groups if this option is TRUE. If FALSE, then regions that overlap each individual 'GRanges' input will be in the output, and if one region overlaps multiple 'GRanges' inputs, then it will be duplicated in the output and will show up in the section for each group.
`inherit_groups` | A logical whether that groups the exist in the profileplyr object in the 'object' argument should be included in the default grouping scheme for the output object of this function. The default is TRUE. If false, only the GRanges overlap annotation will be used for heatmap grouping.

### Details

tbd

### Value

A profileplyr object

### Examples

    # see the groupby function within profileplyr for examples

[Package profileplyr version 1.2.0 Index]