Package 'qtl2bioc'

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

Help Index


Create a function to query genes

Description

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.

Usage

create_ensembl_query_func(ensembl, full_genes_only = TRUE)

Arguments

ensembl

Ensembl gene annotations as a GenomicRanges object.

full_genes_only

If TRUE, filter by type=="gene"

Details

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.

Value

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.

Examples

# 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

Description

Grab ensembl gene annotations from the Bioconductor AnnotationHub.

Usage

grab_ensembl(organism = "mus musculus", set = "AH51040")

Arguments

organism

Character string with name of organism

set

Character string with name of dataset

Value

A GenomicRanges object with the gene annotation information.

Examples

## Not run: 
ensembl <- grab_ensembl()

## End(Not run)