View source: R/feature-plots.R
calcFeatureDist | R Documentation |
For a given query set of genomic regions, and a given feature set of regions, this function will return the distance for each query region to its closest feature. It ignores strand and returns the distance as positive or negative, depending on whether the feature is upstream or downstream
calcFeatureDist(query, features)
query |
A GRanges or GRangesList object with query sets |
features |
A GRanges object with features to test distance to |
This function is similar to the bioconductor distanceToNearest function, but returns negative values for downstream distances instead of absolute values. This allows you to assess the relative location.
A vector of genomic distances for each query region relative to its closest feature.
vistaSftd = GenomicRanges::shift(vistaEnhancers, 100000)
calcFeatureDist(vistaEnhancers, vistaSftd)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.