calcFeatureDist_aY: Find the distance to the nearest genomic feature

View source: R/TSSdists.R

calcFeatureDist_aYR Documentation

Find the distance to the nearest genomic feature

Description

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

Usage

calcFeatureDist_aY(query, features)

Arguments

query

A data.frame with following 3 columns: chr, start, end

features

A data.frame with gene coordinates. Must contain: chr, start, end, gene, geneNum, strand

Details

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.

Value

A data frame with distances to the nearest gene

Examples

data("testData")
data("yeastGenes")
calcFeatureDist_aY(testData, yeastGenes)

AubleLab/annotateYeast documentation built on April 2, 2022, 12:02 a.m.