gintervals.neighbors1: Finds neighbors between two sets of intervals (and does not...

View source: R/intervals.R

gintervals.neighbors1R Documentation

Finds neighbors between two sets of intervals (and does not return conflicting column names)

Description

Finds neighbors between two sets of intervals (and does not return conflicting column names)

Usage

gintervals.neighbors1(
  intervals1 = NULL,
  intervals2 = NULL,
  maxneighbors = 1,
  mindist = -1e+09,
  maxdist = 1e+09,
  na.if.notfound = TRUE,
  fields = NULL
)

Arguments

intervals1, intervals2

intervals

maxneighbors

maximal number of neighbors

mindist, maxdist

distance range for 1D intervals

na.if.notfound

if 'TRUE' return 'NA' interval if no matching neighbors were found, otherwise omit the interval in the answer

fields

select only these fields from intervals2. Note that when there are conflicting names - the repaired name should be used, see tibble::repair_names.

Value

a data frame containing the pairs of intervals from 'intervals1', intervals from 'intervals2' (with a suffix of '1', i.e. chrom1, start1 and end1), and an additional column named 'dist' ('dist1' and 'dist2' for 2D intervals) representing the distance between the corresponding intervals.

See Also

gintervals.neighbors


tanaylab/misha.ext documentation built on Sept. 18, 2024, 2:53 a.m.