| Title: | Connect to Bioconductor for QTL Experiments |
|---|---|
| Description: | Functions to connect to genome databases via Bioconductor, such as to obtain gene annotation information. Part of R/qtl2, a reimplementation of the R/qtl package to better handle high-dimensional data and complex cross designs. |
| Authors: | Karl W Broman [aut, cre]
|
| Maintainer: | Karl W Broman <[email protected]> |
| License: | GPL-3 |
| Version: | 0.22 |
| Built: | 2026-06-04 11:24:52 UTC |
| Source: | https://github.com/rqtl/qtl2bioc |
Create a function that will query genes from a GenomicRanges object with ensembl gene annotations and return a data frame with gene information for a selected region.
create_ensembl_query_func(ensembl, full_genes_only = TRUE)create_ensembl_query_func(ensembl, full_genes_only = TRUE)
ensembl |
Ensembl gene annotations as a GenomicRanges object. |
full_genes_only |
If TRUE, filter by |
Note that this function assumes that the database has
start and end fields that are in basepairs, but
the selection uses positions in Mbp, and the output data frame
should have start and stop columns in Mbp.
Function with three arguments, chr, start,
and end, which returns a data frame with the genes
overlapping that region, with start and end being
in Mbp. The output should contain at least the columns
Name, chr, start, and stop, the
latter two being positions in Mbp.
# small version of ensembl data ensembl <- readRDS(system.file("extdata", "ensembl_small.rds", package="qtl2bioc")) # create query function, pulling only full genes query_ensembl <- create_ensembl_query_func(ensembl) # genes on chr 2 overlapping (96.5 - 97.0) genes <- query_ensembl("2", 96.5, 97.0)# small version of ensembl data ensembl <- readRDS(system.file("extdata", "ensembl_small.rds", package="qtl2bioc")) # create query function, pulling only full genes query_ensembl <- create_ensembl_query_func(ensembl) # genes on chr 2 overlapping (96.5 - 97.0) genes <- query_ensembl("2", 96.5, 97.0)
Grab ensembl gene annotations from the Bioconductor AnnotationHub.
grab_ensembl(organism = "mus musculus", set = "AH51040")grab_ensembl(organism = "mus musculus", set = "AH51040")
organism |
Character string with name of organism |
set |
Character string with name of dataset |
A GenomicRanges object with the gene annotation information.
## Not run: ensembl <- grab_ensembl() ## End(Not run)## Not run: ensembl <- grab_ensembl() ## End(Not run)