[Bioc-devel] lumi data import bug

Florian Hahne f.hahne at dkfz-heidelberg.de
Thu Jun 28 16:27:03 CEST 2007

Hi Pan Du,
I just tried to import some of my Illumina data using you nice lumi 
package. However, lumiR stopped with an error message. When debugging 
the function I noticed that the problem is in the decimal separator that 
is used for numeric data. For the output on a German PC BeadStudio uses 
commas as decimal separators (which is for some strange historic reason 
the German convention...). Now the following will produce a matrix of 
NAs since R doesn't know how to convert e.g. 1,2312 to a numeric
 if (!is.numeric(exprs[1])) {
            exprs <- matrix(as.numeric(exprs), nrow = nrow(allData))

My rather naiv approach of fixing this is to include the following:
if (!is.numeric(exprs[1])) {
    exprs <- gsub(",", ".", exprs, fixed=TRUE)
    exprs <- matrix(as.numeric(exprs), nrow = nrow(allData))

Of course the same needs to be done for the other numeric columns as 
well. There might be a more elegant way to figure out the separator and 
fix this already before.

Hope this helps in your development process,

 > sessionInfo()
R version 2.6.0 Under development (unstable) (2007-06-11 r41910)
attached base packages:
[1] tcltk     tools     stats     graphics  grDevices datasets  utils   
[8] methods   base    
other attached packages:
 [1] debug_1.1.0           mvbutils_1.1.1        lumi_1.3.13         
 [4] annotate_1.15.2       AnnotationDbi_0.0.78  RSQLite_0.5-4       
 [7] DBI_0.2-3             mgcv_1.3-24           affy_1.15.7         
[10] preprocessCore_0.99.7 affyio_1.5.4          Biobase_1.15.14     
loaded via a namespace (and not attached):
[1] rcompgen_0.1-13

More information about the Bioc-devel mailing list