Learn R Programming

misha (version 4.2.9)

gintervals.intersect: Calculates an intersection of two sets of intervals

Description

Calculates an intersection of two sets of intervals.

Usage

gintervals.intersect(
  intervals1 = NULL,
  intervals2 = NULL,
  intervals.set.out = NULL
)

Value

If 'intervals.set.out' is 'NULL' a data frame representing the intersection of intervals.

Arguments

intervals1, intervals2

set of intervals

intervals.set.out

intervals set name where the function result is optionally outputted

Details

This function returns intervals that represent a genomic space which is achieved by intersection of 'intervals1' and 'intervals2'.

If 'intervals.set.out' is not 'NULL' the result is saved as an intervals set. Use this parameter if the result size exceeds the limits of the physical memory.

See Also

gintervals.2d.band_intersect, gintervals.diff, gintervals.union, gintervals, gintervals.2d

Examples

Run this code
# \dontshow{
options(gmax.processes = 2)
# }

gdb.init_examples()

intervs1 <- gscreen("dense_track > 0.15")
intervs2 <- gscreen("dense_track < 0.2")

## 'intervs3' and 'intervs4' are identical
intervs3 <- gintervals.intersect(intervs1, intervs2)
intervs4 <- gscreen("dense_track > 0.15 & dense_track < 0.2")

Run the code above in your browser using DataLab