Group regions from the same chromosome together and compute the distance of a region to its nearest neighbor. Distances are then lumped into a numeric vector.

calcNearestNeighbors(query, correctRef = "None")

## Arguments

query

A GRanges or GRangesList object.

correctRef

A string indicating the reference genome to use if Nearest neighbor distances are corrected for the number of regions in a regionSet.

## Value

A numeric vector or list of vectors containing the distance of regions to their nearest neighbors.

## Examples

Nneighbors = calcNearestNeighbors(vistaEnhancers)