[Bioc-devel] combine sometimes/often fails with LumiBatch objects
Gordon Smyth
smyth at wehi.EDU.AU
Tue Oct 16 01:33:30 CEST 2007
We've had regular problems with combine() with LumiBatch objects. I
can't, or don't have time, to provide a reproducible example, but
here's a recent example from my own practice. I read 5 LumiBatch objects
library(lumi)
x1 <- lumiR(file.path("IlluminaLSK",files[1]))
x2 <- lumiR(file.path("IlluminaLSK",files[2]))
x3 <- lumiR(file.path("IlluminaLSK",files[3]))
x4 <- lumiR(file.path("IlluminaLSK",files[4]))
x5 <- lumiR(file.path("IlluminaLSK",files[5]))
Then
x <- combine(combine(combine(combine(x1,x2),x3),x4),x5)
will fail (return a fatal error), on the final combine. Yet
x <- combine(combine(combine(x2,x3),x4),x5)
x <- combine(x1,x)
will succeed. On the other hand, if I force all the sample names to be unique:
sampleNames(x1) <- pData(x1)$sampleID
sampleNames(x2) <- pData(x2)$sampleID
sampleNames(x3) <- pData(x3)$sampleID
sampleNames(x4) <- pData(x4)$sampleID
sampleNames(x5) <- pData(x5)$sampleID
then
x <- combine(combine(combine(combine(x1,x2),x3),x4),x5)
now works fine.
Hope this provides some useful info.
Gordon
> library(limma)
> targets <- readTargets(comment.char="")
> row.names(targets) <- targets$ArrayID
> files <- unique(targets$File)
>
> library(lumi)
Loading required package: Biobase
Loading required package: tools
Welcome to Bioconductor
Vignettes contain introductory material. To view, type
'openVignette()'. To cite Bioconductor, see
'citation("Biobase")' and for packages 'citation(pkgname)'.
Loading required package: affy
Loading required package: affyio
Loading required package: preprocessCore
Loading required package: mgcv
This is mgcv 1.3-27
Loading required package: annotate
Loading required package: AnnotationDbi
Loading required package: DBI
Loading required package: RSQLite
Loading required package: xtable
> x1 <- lumiR(file.path("IlluminaLSK",files[1]))
> x2 <- lumiR(file.path("IlluminaLSK",files[2]))
> x3 <- lumiR(file.path("IlluminaLSK",files[3]))
> x4 <- lumiR(file.path("IlluminaLSK",files[4]))
> x5 <- lumiR(file.path("IlluminaLSK",files[5]))
>
> x <- combine(combine(combine(x2,x3),x4),x5)
Warning message:
In combine(combine(combine(x2, x3), x4), x5) :
Two data sets have some duplicated sample names!
"_2" were attached to the duplicated sample names!
> x <- combine(x1,x)
Warning message:
In combine(x1, x) : Two data sets have some duplicated sample names!
"_2" were attached to the duplicated sample names!
>
> pData(x1)
sampleID label
D 1735640067_D D
E 1735640067_E E
F 1735640067_F F
> pData(x2)
sampleID label
1736925587_A 1736925587_A 1736925587_A
1736925587_B 1736925587_B 1736925587_B
1736925587_C 1736925587_C 1736925587_C
1736925587_D 1736925587_D 1736925587_D
1736925587_E 1736925587_E 1736925587_E
1736925587_F 1736925587_F 1736925587_F
1736925588_A 1736925588_A 1736925588_A
1736925588_B 1736925588_B 1736925588_B
1736925588_C 1736925588_C 1736925588_C
1736925588_D 1736925588_D 1736925588_D
> pData(x3)
sampleID label
1736925548_A 1736925548_A 1736925548_A
1736925548_B 1736925548_B 1736925548_B
1736925549_A 1736925549_A 1736925549_A
1736925549_B 1736925549_B 1736925549_B
1736925549_C 1736925549_C 1736925549_C
1736925549_D 1736925549_D 1736925549_D
1736925549_E 1736925549_E 1736925549_E
1736925549_F 1736925549_F 1736925549_F
1736925552_A 1736925552_A 1736925552_A
1736925552_B 1736925552_B 1736925552_B
1736925552_C 1736925552_C 1736925552_C
1736925552_D 1736925552_D 1736925552_D
1736925552_E 1736925552_E 1736925552_E
1736925552_F 1736925552_F 1736925552_F
> pData(x4)
sampleID label
C 1897016048_C C
D 1897016048_D D
E 1897016048_E E
F 1897016048_F F
> pData(x5)
sampleID label
D 1897016078_D D
E 1897016078_E E
F 1897016078_F F
> x <- combine(combine(combine(combine(x1,x2),x3),x4),x5)
Error in combineElement(x[[nm]], y[[nm]]) :
assayData elements must have identical data
non-conforming sample(s): D_2, E_2, F_2
In addition: Warning messages:
1: In combine(combine(combine(x1, x2), x3), x4) :
Two data sets have some duplicated sample names!
"_2" were attached to the duplicated sample names!
2: In combine(combine(combine(combine(x1, x2), x3), x4), x5) :
Two data sets have some duplicated sample names!
"_2" were attached to the duplicated sample names!
> sampleNames(x1) <- pData(x1)$sampleID
> sampleNames(x2) <- pData(x2)$sampleID
> sampleNames(x3) <- pData(x3)$sampleID
> sampleNames(x4) <- pData(x4)$sampleID
> sampleNames(x5) <- pData(x5)$sampleID
>
> x <- combine(combine(combine(combine(x1,x2),x3),x4),x5)
> sessionInfo()
R version 2.6.0 (2007-10-03)
i386-pc-mingw32
locale:
LC_COLLATE=English_Australia.1252;LC_CTYPE=English_Australia.1252;LC_MONETARY=English_Australia.1252;LC_NUMERIC=C;LC_TIME=English_Australia.1252
attached base packages:
[1] tools stats graphics grDevices
utils datasets methods base
other attached packages:
[1]
lumi_1.4.0 annotate_1.16.0 xtable_1.5-1
AnnotationDbi_1.0.0
[5]
RSQLite_0.6-3 DBI_0.2-3 mgcv_1.3-27
affy_1.16.0
[9] preprocessCore_1.0.0
affyio_1.6.0 Biobase_1.16.0 limma_2.12.0
More information about the Bioc-devel
mailing list