Entering edit mode
Dear all,
Here is a possible bug in the combine() function from beadarray. I
read two
ExpressionSetIllumina objects with 36 samples and 12 samples each. The
combine() function works brilliantly and without errors or warnings
but I
get error message when I try to change the sample names.
## create fake data to read in ##
tmp <- data.frame( PROBE_ID = paste0("P", 1:10), SYMBOL =
LETTERS[1:10],
S1.AVG_Signal = rnorm(10, mean=7), S2.AVG_Signal =
rnorm(10, mean=8), S3.AVG_Signal = rnorm(10, mean=6) )
write.table(tmp, file="SampleProbeProfile_1.txt", sep="\t", quote=F,
row.names=F)
rm(tmp)
tmp <- data.frame( PROBE_ID = paste0("P", 1:10), SYMBOL =
LETTERS[1:10],
S4.AVG_Signal = rnorm(10, mean=9), S5.AVG_Signal =
rnorm(10, mean=6) )
write.table(tmp, file="SampleProbeProfile_2.txt", sep="\t", quote=F,
row.names=F)
rm(tmp)
## Read in and combine ##
raw1 <- readBeadSummaryData(dataFile="SampleProbeProfile_1.txt",
ProbeID="PROBE_ID", columns=list(exprs="AVG_Signal"), skip=0)
raw2 <- readBeadSummaryData(dataFile="SampleProbeProfile_2.txt",
ProbeID="PROBE_ID", columns=list(exprs="AVG_Signal"), skip=0)
raw <- combine(raw1, raw2) # no warnings or error
dim(raw1)
# Features Samples Channels
# 10 3 1
dim(raw2)
# Features Samples Channels
# 10 2 1
dim(raw)
# Features Samples Channels
# 10 5 1
raw1, raw2 and raw are all of ExpressionSetIllumina class.
And here is the problem:
sampleNames(raw) <- paste0("Sample", 1:5)
# Error in `sampleNames<-`(`*tmp*`, value = c("Sample1", "Sample2",
"Sample3", :
# number of new names (5) should equal number of rows in
AnnotatedDataFrame (3)
Alternatively, I could change the rownames of raw1 and raw2 separately
and
then combine but I am just curious as to why this error message. Thank
you.
Regards, Adai
[[alternative HTML version deleted]]