R/grab_ensembl.R

Defines functions grab_ensembl

Documented in grab_ensembl

#' Grab ensembl gene annotations
#'
#' Grab ensembl gene annotations from the Bioconductor AnnotationHub.
#'
#' @param organism Character string with name of organism
#' @param set Character string with name of dataset
#'
#' @return A GenomicRanges object with the gene annotation information.
#'
#' @export
#' @importFrom AnnotationHub AnnotationHub query
#'
#' @examples
#' \dontrun{
#' ensembl <- grab_ensembl()
#' }

grab_ensembl <-
    function(organism="mus musculus", set="AH51040")
{
    hub <- AnnotationHub::AnnotationHub()
    hub <- AnnotationHub::query(hub, c(organism, "ensembl", "gtf"))
    hub[[set]]
}
rqtl/qtl2bioc documentation built on Jan. 2, 2021, 1:53 a.m.