annotation: Annotation Accessor and Setter

annotation,AnyHermesData-methodR Documentation

Annotation Accessor and Setter

Description

[Stable]

These methods access and set the gene annotations stored in a AnyHermesData object.

Usage

## S4 method for signature 'AnyHermesData'
annotation(object, ...)

.row_data_annotation_cols

## S4 replacement method for signature 'AnyHermesData,DataFrame'
annotation(object) <- value

Arguments

object

(AnyHermesData)
object to access the annotations from.

...

not used.

value

(DataFrame)
what should the annotations be replaced with.

Format

The annotation column names are available in the exported character vector .row_data_annotation_cols.

Value

The S4Vectors::DataFrame with the gene annotations:

  • symbol

  • desc

  • chromosome

  • size

Note

When trying to replace the required annotations with completely missing values for any genes, a warning will be given and the corresponding gene IDs will be saved in the attribute annotation.missing.genes. Note also that additional annotations beyond the required ones may be supplied and will be stored.

Examples

object <- hermes_data
head(annotation(object))

insightsengineering/hermes documentation built on Dec. 15, 2024, 8:07 a.m.