The code you show is intriguing because you have in the error message a reference to the GSE10000 dataset, which is indeed Mouse430_2 arrays, but also to GSE50833, which are Agilent-028005 SurePrint G3 arrays. At any rate, the error suggests that you are trying to read different arrays with ReadAffy() and that fails because different arrays have different dimensions. First thing I would try myself is to make sure that all the files are of the same platform/array.
EDIT
I could replicate the problem and confirm my guess using the following experiment (there must be a better way to do this than reading the whole set of files one by one):
f <- list.files(pattern = "CEL.gz")
celf <- lapply(f, function(x) ReadAffy(filenames = x))
table(sapply(celf, annotation))
mouse4302 mouse430a2
18 17
The solution is to read them separately.
EDIT 2
OK, this is the most effective (fast) way to check the chip type of a bunch of cel files:
library(affyio)
f <- list.files(pattern = "CEL.gz")
table(sapply(f, function(x) read.celfile.header(x)$cdfName))
Mouse430_2 Mouse430A_2
18 17
EDIT 3
And this is how you can use the information above to read the files in different batches:
ff <- split(f, sapply(f, function(x) read.celfile.header(x)$cdfName))
ff
$Mouse430_2
[1] "GSM250879.CEL.gz" "GSM250880.CEL.gz" "GSM250881.CEL.gz" "GSM250882.CEL.gz" "GSM250919.CEL.gz" "GSM250920.CEL.gz"
[7] "GSM250922.CEL.gz" "GSM250923.CEL.gz" "GSM250925.CEL.gz" "GSM250927.CEL.gz" "GSM250928.CEL.gz" "GSM250943.CEL.gz"
[13] "GSM44658.CEL.gz" "GSM44659.CEL.gz" "GSM44660.CEL.gz" "GSM44661.CEL.gz" "GSM44662.CEL.gz" "GSM44663.CEL.gz"
$Mouse430A_2
[1] "GSM252007.CEL.gz" "GSM252008.CEL.gz" "GSM252009.CEL.gz" "GSM252010.CEL.gz" "GSM252011.CEL.gz" "GSM252014.CEL.gz"
[7] "GSM252015.CEL.gz" "GSM252016.CEL.gz" "GSM252017.CEL.gz" "GSM252018.CEL.gz" "GSM252021.CEL.gz" "GSM252022.CEL.gz"
[13] "GSM252033.CEL.gz" "GSM252040.CEL.gz" "GSM252051.CEL.gz" "GSM252052.CEL.gz" "GSM252053.CEL.gz"
library(affy)
abatch1 <- ReadAffy(filenames = ff$Mouse430_2)
abatch2 <- ReadAffy(filenames = ff$Mouse430A_2)
And so on.
Hi, F
It seems that it is a dimension problem.
hgu133a hgu133b hgu133plus2 hgu95av2
306 115 349 49
Error in affyio::read_abatch(filenames, rm.mask, rm.outliers, rm.extra, : Cel file /Volumes/新加卷 1/GBM_cel/GSE13041/GSM326852.CEL.gz does not seem to have the correct dimensions
Please read the accepted answer. This should cover your problem. Check if there multiple different array types you are trying to load. If this does not help, please open a new question.