getExons: Find closest exon(s) to a genomic region

Description Usage Arguments Value Author(s) See Also Examples

View source: R/getExons.R

Description

Given any genomic region (chromosome, start, end), return the closest known exon.

Usage

1
getExons(region, annotation, verbose = TRUE)

Arguments

region

length-3 vector (chromosome, start position, end position) of the genomic region of interest. Note that chromosome needs to be in the same format as the chr column of annotation.

annotation

Data frame containing exon information (one row per exon) for the appropriate genome. Must contain columns chr, start, and end. It is recommended that getAnnotation be used to obtain an annotation data frame.

verbose

If TRUE, prints output messages when function finishes.

Value

A list with elements

region

the region argument provided

closestExons

the rows of annotation corresponding to the closest exon to region

closest exon to region

Author(s)

Alyssa Frazee

See Also

getAnnotation

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
exons = getAnnotation("hg19","knownGene")
theRegion = c("chr22", 18216902, 18218350)
getExons(theRegion, exons)
foo = getExons(theRegion, exons)
foo
foo$closestExons

## End(Not run)

leekgroup/derfinder documentation built on May 20, 2019, 11:30 p.m.