Skip to contents

Returns the GRanges object stored in the annotations slot. Public accessor replacement for obj@annotations or methods::slot(obj, "annotations").

Usage

annotations(x, ...)

# S4 method for class 'epiRomicsS4'
annotations(x, ...)

Arguments

x

An epiRomicsS4 object.

...

Currently unused; reserved for method extension.

Value

A GRanges object. Empty (length 0) if no annotations have been assigned.

See also

annotations<-, epiRomicsS4

Examples

db <- make_example_database()
annotations(db)
#> GRanges object with 24 ranges and 1 metadata column:
#>        seqnames      ranges strand |                type
#>           <Rle>   <IRanges>  <Rle> |         <character>
#>    [1]     chr1   1000-2000      * | hg38_custom_h3k4me1
#>    [2]     chr1   5000-6000      * | hg38_custom_h3k4me1
#>    [3]     chr1 10000-11000      * | hg38_custom_h3k4me1
#>    [4]     chr1 20000-21000      * | hg38_custom_h3k4me1
#>    [5]     chr1 50000-51000      * | hg38_custom_h3k4me1
#>    ...      ...         ...    ... .                 ...
#>   [20]     chr1   1000-2000      * |     hg38_custom_TF2
#>   [21]     chr1 20000-21000      * |     hg38_custom_TF2
#>   [22]     chr1 50000-51000      * |     hg38_custom_TF2
#>   [23]     chr1   1000-2000      * |  hg38_custom_fantom
#>   [24]     chr1 50000-51000      * |  hg38_custom_fantom
#>   -------
#>   seqinfo: 1 sequence from an unspecified genome; no seqlengths
length(annotations(db))
#> [1] 24