fracOverlap {girafe} | R Documentation

## Retrieve intervals overlapping by fraction of width

### Description

Function to retrieve overlapping intervals that overlap at least by a specified fraction of their widths.

### Usage

    fracOverlap(I1, I2, min.frac=0.0, both=TRUE, mem.friendly=FALSE)

### Arguments

`I1` | object that inherits from class `Genome_intervals`
`I2` | object that inherits from class `Genome_intervals`
`min.frac` | numeric; minimum required fraction of each of the two interval widths by which two intervals should overlap in order to be marked as overlapping.
`both` | logical; shall both overlap partners meet the minimum fraction `min.frac` requirement? If `FALSE`, then overlaps with only partner involved to at least that fraction are also reported.
`mem.friendly` | logical; if set to `TRUE` an older but memory-friendlier version of `interval_overlap` is used inside this function. Note that `mem.friendly` is only evaluated if `I1` or `I2` is of class `AlignedGenomeIntervals`.

### Value

An object of class `data.frame` with one row each for a pair of overlapping elements.

`Index1` | Index of interval in first interval list
`Index2` | Index of interval in second interval list
`n` | number of bases that the two intervals overlap
`fraction1` | fraction of interval 1's width by which the two intervals overlap
`fraction2` | fraction of interval 2's width by which the two intervals overlap

### Author(s)

J. Toedling

### See Also

`interval_overlap`

### Examples

       data("gen_ints", package="genomeIntervals")
       i[4,2] <- 13L
       fracOverlap(i, i, 0.5)

[Package girafe version 1.38.0 Index]