get gene annotation for a GRanges object by linking to the nearest gene

findNearestGeneForGr(gr, geneGr = NULL, maxDist = 1e+05)

Arguments

gr

GRanges object

geneGr

gene annotation from which to pull the annotation. Can be NULL for automatic retrieval of annotation. Must be named or have a gene name column in the metadata

maxDist

maximum distance for matching to nearest gene

Value

data.frame containing information on the nearest gene for each element in gr