calcFeatureDist_aY | 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_aY(query, features)
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 |
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 data frame with distances to the nearest gene
data("testData") data("yeastGenes") calcFeatureDist_aY(testData, yeastGenes)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.