GenomicStateHub: Access GenomicState objects through AnnotationHub

Description Usage Arguments Value Author(s) See Also Examples

View source: R/GenomicStateHub.R

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

1
2
3
4
5
6
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## 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 Aug. 15, 2021, 11:16 a.m.