plotNeighborDist: Plot the distances from regions to their upstream/downstream...

View source: R/neighbor-distances.R

plotNeighborDistR Documentation

Plot the distances from regions to their upstream/downstream neighbors or nearest neighbors. Distances can be passed as either raw bp or corrected for the number of regions (log10(obs/exp)), but this has to be specified in the function parameters.

Description

Plot the distances from regions to their upstream/downstream neighbors or nearest neighbors. Distances can be passed as either raw bp or corrected for the number of regions (log10(obs/exp)), but this has to be specified in the function parameters.

Usage

plotNeighborDist(dcvec, correctedDist = FALSE, Nneighbors = FALSE)

Arguments

dcvec

A numeric vector or list of vectors containing distances to upstream/downstream neighboring regions or to nearest neighbors. Produced by calcNeighborDist or calcNearestNeighbors

correctedDist

A logical indicating if the plot axis should be adjusted to show distances corrected for the number of regions in a regionset.

Nneighbors

A logical indicating whether legend should be adjusted if Nearest neighbors are being plotted. Default legend shows distances to upstream/downstream neighbors.

Value

A ggplot density object showing the distribution of raw or corrected distances.

Examples

numVector = rnorm(400, mean=5, sd=0.1)
d = plotNeighborDist(numVector)

databio/GenomicDistributions documentation built on April 30, 2024, 4:34 a.m.