build_annotations: A function to build annotations from TxDb.* and AnnotationHub...

Description Usage Arguments Value Examples

View source: R/build_annotations.R

Description

Create a GRanges object consisting of all the desired annotations. Supported annotation codes are listed by builtin_annotations(). The basis for enhancer annotations are FANTOM5 data, the basis for CpG related annotations are CpG island tracks from AnnotationHub, and the basis for genic annotations are from the TxDb.* and org.db group of packages.

Usage

1

Arguments

genome

The genome assembly.

annotations

A character vector of annotations to build. Valid annotation codes are listed with builtin_annotations(). The "basicgenes" shortcut builds the following regions: 1-5Kb upstream of TSSs, promoters, 5UTRs, exons, introns, and 3UTRs. The "cpgs" shortcut builds the following regions: CpG islands, shores, shelves, and interCGI regions. NOTE: Shortcuts need to be appended by the genome, e.g. hg19_basicgenes. Custom annotations whose names are of the form [genome]_custom_[name] should also be included. Custom annotations should be read in and converted to GRanges with read_annotations(). They can be for a supported_genome(), or for an unsupported genome.

Value

A GRanges object of all the annotations combined. The mcols are id, tx_id, gene_id, symbol, type. The id column is a unique name, the tx_id column is either a UCSC knownGene transcript ID (genic annotations) or a Ensembl transcript ID (lncRNA annotations), the gene_id is the Entrez ID, the symbol is the gene symbol from the org.*.eg.db mapping from the Entrez ID, and the type is of the form [genome]_[type]_[name].

Examples

1
2
3
4
5
# Example with hg19 gene promoters
annots = c('hg19_genes_promoters')
annots_gr = build_annotations(genome = 'hg19', annotations = annots)

# See vignette for an example with custom annotation

rcavalcante/annotatr documentation built on Oct. 19, 2018, 6:38 p.m.