sample_annotation: Retrive or set the sample_annotation attribute

Description Usage Arguments Value Examples

Description

Retrive or set the sample_annotation attribute

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
# 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))

CEMiTool documentation built on March 13, 2021, 2 a.m.