sample_annotation: Retrive or set the sample_annotation attribute

sample_annotationR Documentation

Retrive or set the sample_annotation attribute

Description

Retrive or set the sample_annotation attribute

Usage

sample_annotation(cem)

## S4 method for signature 'CEMiTool'
sample_annotation(cem)

sample_annotation(
  cem,
  sample_name_column = "SampleName",
  class_column = "Class"
) <- value

## S4 replacement method for signature 'CEMiTool'
sample_annotation(
  cem,
  sample_name_column = "SampleName",
  class_column = "Class"
) <- value

Arguments

cem

Object of class CEMiTool

sample_name_column

A string containing the name of a column which should be used as a unique identifier for samples in the file. Only used when assigning a sample annotation data.frame. Default: "SampleName".

class_column

A string containing the name of a column which should be used to identify different sample groups. Only used when assigning a sample annotation data.frame. Default: "Class"

value

A data.frame containing the sample annotation, should have at least two columns containing the Class and the Sample Name that should match with samples in expression

Value

A data.frame containing characteristics of each sample.

Examples

# Get example expression data
data(expr0)
# Get example sample_annotation data
data(sample_annot)
# Initialize CEMiTool object with expression
cem <- new_cem(expr0)
# Add sample annotation file to CEMiTool object
sample_annotation(cem,
    sample_name_column="SampleName",
    class_column="Class") <- sample_annot
# Check annotation
head(sample_annotation(cem))


csbl-usp/CEMiTool documentation built on March 27, 2024, 5:14 a.m.