get_nearest_annotation {brainflowprobes} | R Documentation

## Compute the nearest annotation to the annoated genes in brainflowprobes

### Description

For a given set of genomic regions, this function computes the nearest annotation information using the Annotated Genes required by this package. The Annotated Genes are actually provided by `GenomicState::GenomicStateHub()`.

### Usage

    get_nearest_annotation(gr, CODING_ONLY = FALSE)

### Arguments

`gr` | A GenomicRanges::GRanges() object.
`CODING_ONLY` | A logical vector of length 1 specifying whether to subset the Annotated Genes to only the coding genes. That is, whether to subset the genes by whether they have a non-NA `CSS` value. The Annotated Genes are downloaded with `GenomicState::GenomicStateHub()`.

### Details

This is an utility function used by region_info, four_panels and plot_coverage.

### Value

The `bumphunter::matchGenes()` output for the annotation information using the Annotated Genes for Gencode version 31 on hg19 coordinates (subset to only the coding elements if `CODING_ONLY` was set to `TRUE`).

### Author(s)

Leonardo Collado-Torres

### Examples

    gr <- GenomicRanges::GRanges("chr10:135379301-135379311:+")

    get_nearest_annotation(gr)
    get_nearest_annotation(gr, CODING_ONLY = TRUE)

[Package brainflowprobes version 1.2.0 Index]