assocComp-methods: Associate principal components with sample annotations

Description Usage Arguments Value Author(s) Examples

Description

This function associates principal components with sample annotations such as age, gender, batch_id. Can be used to detect which batch effects are associated with the variation in the methylation values.

Usage

1
assocComp(mBase, sampleAnnotation)

Arguments

mBase

methylBase or methylBaseDB object with no NA values in the data part.

sampleAnnotation

a data frame where columns are different annotations and rows are the samples, in the same order as in the methylBase object.

Value

a named list of principal component matrix (named 'pcs'), by principal compopents (named 'vars') and a p-value matrix showing association p-values between sample annotations and principal components (named 'association').

Author(s)

Altuna Akalin

Examples

1
2
3
data(methylKit)
sampleAnnotation=data.frame(batch_id=c("a","a","b","b"),age=c(19,34,23,40))
as=assocComp(mBase=methylBase.obj,sampleAnnotation)

qizhengyang2017/methylKit_1.8.1 documentation built on May 5, 2019, 7:58 p.m.