addAnnotation: Adding sample annotations to a 'SummarizedExperiment' object

Description Usage Arguments Value Author(s) See Also Examples

View source: R/classes.R

Description

Adds a new sample annotation to the SummarizedExperiment object. In other words it adds and column with sample annotations to the colData of the SummarizedExperiment object.

Usage

1
addAnnotation(x, sampleAnnotationType, sampleAnnotation)

Arguments

x

Object of type SummarizedExperiment.

sampleAnnotationType

The name of the new column to be added to the colData table of SummarizedExperiment object.

sampleAnnotation

Vector with the same length as the row-size of the colData attribute of the SummarizedExperiment object, which includes the sample annotations.

Value

An InterestResult object.

Author(s)

Ali Oghabian

See Also

getAnnotation

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Check the annotation table of mdsChr22Obj data
getAnnotation(mdsChr22Obj)

# Add a new sample annotation
newMdsChr22Obj <- addAnnotation(x=mdsChr22Obj,
	sampleAnnotationType="sample_number",
	sampleAnnotation=1:16
)

# Retrieve annotations of the new object
getAnnotation(newMdsChr22Obj)

IntEREst documentation built on Nov. 8, 2020, 8:05 p.m.