reduceByPercentage: Reduce by percentage of overlaps of GRanges object

View source: R/prepareBindingSites.R

reduceByPercentageR Documentation

Reduce by percentage of overlaps of GRanges object

Description

Merge the ranges by percentage of overlaps to avoid broad ranges of continues ranges overlapped with limit bases.

Usage

reduceByPercentage(
  query,
  percentage,
  ignore.strand = TRUE,
  colnToKeep = c("score", "motif")
)

Arguments

query

An object of GRanges

percentage

A numeric vector (length=1). The percentage of overlapping region of binding sites to merge as one range.

ignore.strand

When set to TRUE, the strand information is ignored in the calculations.

colnToKeep

The metadata colnums should be kept for reduced GRanges

Value

An object of GRanges.

Examples

library(GenomicRanges)
gr <- GRanges("chr1", IRanges(c(1, 5, 10), width=c(10, 5, 2)))
reduceByPercentage(gr, 0.5, colnToKeep=NULL)

jianhong/ATACseqTFEA documentation built on Feb. 9, 2024, 4:09 a.m.