GenomicStateHub: Access GenomicState objects through AnnotationHub

View source: R/GenomicStateHub.R

GenomicStateHubR Documentation

Access GenomicState objects through AnnotationHub

Description

This function uses AnnotationHub to obtain the objects provided by this package. These are: the TxDb object made with gencode_txdb(), the annotated genes object made with gencode_annotated_genes() or the GenomicState object made with gencode_genomic_state().

Usage

GenomicStateHub(
  version = "31",
  genome = c("hg38", "hg19"),
  filetype = c("TxDb", "AnnotatedGenes", "GenomicState"),
  ah = AnnotationHub::AnnotationHub()
)

Arguments

version

A character(1) with the Gencode version number.

genome

A character(1) with the human genome version number. Valid options are 'hg38' or 'hg19'.

filetype

A character() with either TxDb, AnnotatedGenes or GenomicState.

ah

An AnnotationHub object AnnotationHub-class.

Value

The AnnotationHub-class query for the file you requested.

Author(s)

Leonardo Collado-Torres

See Also

gencode_txdb() gencode_annotated_genes() gencode_genomic_state()

Examples


## Query AnnotationHub for the GenomicState object for Gencode v31 on
## hg19 coordinates
hub_query_gs_gencode_v31_hg19 <- GenomicStateHub(
    version = "31",
    genome = "hg19",
    filetype = "GenomicState"
)
hub_query_gs_gencode_v31_hg19


## Check the metadata
mcols(hub_query_gs_gencode_v31_hg19)

## Access the file through AnnotationHub
if (length(hub_query_gs_gencode_v31_hg19) == 1) {
    hub_gs_gencode_v31_hg19 <- hub_query_gs_gencode_v31_hg19[[1]]

    hub_gs_gencode_v31_hg19
}

LieberInstitute/GenomicState documentation built on May 12, 2023, 5:15 p.m.