Description Usage Arguments Value Examples
View source: R/build_annotations.R
A helper function to build arbitrary annotatinos from AnnotationHub
1 | build_ah_annots(genome, ah_codes, annotation_class)
|
genome |
The genome assembly. |
ah_codes |
A named character vector giving the AnnotationHub accession number (e.g. AH23256), and whose name describes what the annotation is (e.g. Gm12878_H3K4me3). |
annotation_class |
A string to name the group of annotations in |
A GRanges
object stored in annotatr_cache
. To view an annotation built with this function, do annotatr_cache$get(name)
. To add these annotations to a set of annotations, include '[genome]_[annotation_class]_[name]'
in the call to build_annotations()
. See example below.
1 2 3 4 5 6 7 8 | # Create a named vector for the AnnotationHub accession codes with desired names
h3k4me3_code = c('Gm12878' = 'AH23256')
# Fetch ah_codes from AnnotationHub and create annotations annotatr understands
build_ah_annots(genome = 'hg19', ah_codes = h3k4me3_code, annotation_class = 'H3K4me3')
# The annotations as they appear in annotatr_cache
annot_name = c('hg19_H3K4me3_Gm12878')
# Build the annotations right before annotating any regions
annotations = build_annotations(genome = 'hg19', annotations = annot_name)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.