read_annotations | R Documentation |
read_annotations()
is a wrapper for the rtracklayer::import()
function that creates a GRanges
object matching the structure of annotations built with build_annotations()
. The structure is defined by GRanges
, with the mcols()
with names c('id','gene_id','symbol','type')
.
read_annotations(con, name, genome = NA, format, extraCols = character(), ...)
con |
A path, URL, connection or BEDFile object. See |
name |
A string for the name of the annotations to be used in the name of the object, [genome]_custom_[name] |
genome |
From |
format |
From |
extraCols |
From |
... |
Parameters to pass onto the format-specific method of |
A GRanges
object stored in annotatr_cache
. To view a custom annotation, do annotatr_cache$get(name)
. To add a custom annotation to the set of annotations, include '[genome]_custom_[name]'
in the call to build_annotations()
. See example below.
# Read in a BED3 file as a custom annotation
file = system.file('extdata', 'test_annotations_3.bed', package='annotatr')
read_annotations(con = file, name = 'test', genome = 'hg19')
build_annotations(genome = 'hg19', annotations = 'hg19_custom_test')
print(annotatr_cache$get('hg19_custom_test'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.