rename_samples: Rename sample names

Description Usage Arguments Value Examples

Description

Rename sample names

Usage

1
2
3
4
5
6
7
rename_samples(dat, ...)

## S3 method for class 'raw_data'
rename_samples(dat, samples, suffix = NULL, ...)

## S3 method for class 'norm_data'
rename_samples(dat, samples, ...)

Arguments

dat

List object, containing at least two matrices "intensity" and "theta". Or matrix with raw data.

...

Placeholder for generic function.

samples

Matrix or data.frame with two columns: 1. (prefix of) colnames of dat and 2. meaningful sample name.

suffix

Vector of two characters (e.g. c("Grn.idat", "Red.idat")) describing which suffix should be appended to the sample name.

Value

List with two matrices "intensity" (signal intensities) and "theta" (genotype value).

Examples

1
2
3
4
5
6
if(require(brassicaData)){
data(raw_napus, package = "brassicaData")
samples <- read_sample_sheets(files = list.files(system.file("extdata",
package = "brassicaData"), full.names = TRUE, pattern = "csv"))
raw_napus <- rename_samples(raw_napus, samples = samples[,2:1], suffix = c("_Grn", "_Red"))
}

grafab/gsrc documentation built on May 17, 2019, 8:18 a.m.