[BioC] shuffle the sample names of an expressionSet

Al Tango time.is.flying at gmail.com
Mon Nov 10 17:30:40 CET 2008


Hi, all, I want to randomly shuffle sample names in an object of
expressionSet, aiming
to perform permutation test. I did as follows, but the following test
result remained unchanged (When I shuffled the original data file
names before 'ReadAffy()' , the result did change). So it must be
wrong; what's the way please?  Thanks to everybody who help / has
helped me.
e.g.

library(affy)
eset=rma(ReadAffy(filenames=c('sample1.CEL','sample2.CEL','sample3.CEL'))

# below was what I did to shuffle sample names
colnames(exprs(eset))=sample(colnames(exprs(eset)))
rownames(pData(eset))=colnames(exprs(eset))



More information about the Bioconductor mailing list