gencode_genomic_state: Build a GenomicState object for Gencode TxDb objects

View source: R/gencode_genomic_state.R

gencode_genomic_stateR Documentation

Build a GenomicState object for Gencode TxDb objects

Description

Based on a TxDb object built by gencode_txdb() this function builds a GenomicState object which you can then use with derfinder::annotateRegions(). This information is then used by packages like derfinderPlot.

Usage

gencode_genomic_state(txdb)

Arguments

txdb

A GenomicFeatures::TxDb object built with gencode_txdb().

Details

Note that not all genes will have symbols as many will be NA.

Value

A GenomicState object with the gene symbols as built using derfinder::makeGenomicState().

Author(s)

Leonardo Collado-Torres

References

Based on code for the brainflowprobes package at: https://github.com/LieberInstitute/brainflowprobes/blob/devel/data-raw/create_sysdata.R

See Also

gencode_txdb() gencode_annotated_genes()

Examples


## Start from scratch if you want:
## Not run: 
txdb_v31_hg19_chr21 <- gencode_txdb("31", "hg19", chrs = "chr21")

## End(Not run)

## or read in the txdb object for hg19 chr21 from this package
txdb_v31_hg19_chr21 <- AnnotationDbi::loadDb(
    system.file("extdata", "txdb_v31_hg19_chr21.sqlite",
        package = "GenomicState"
    )
)

## Now build the GenomicState object
gs_v31_hg19_chr21 <- gencode_genomic_state(txdb_v31_hg19_chr21)

## Explore the result
gs_v31_hg19_chr21

LieberInstitute/GenomicState documentation built on Dec. 13, 2024, 11:19 p.m.