[BioC] normalize.quantiles generating incorrect output

Wolfgang Huber w.huber at dkfz-heidelberg.de
Mon Feb 2 12:11:03 MET 2004


Hi Jeffrey,

I think this is because you are passing 'normalize.quantiles' a matrix 
of integers, while that function expects a matrix of doubles:

 > print(normalize.quantiles(y))
               [,1]          [,2]
[1,] 8.360796e-270 8.360796e-270
[2,] 9.980857e-264 9.980857e-264

 > print(normalize.quantiles(y+0))
      [,1] [,2]
[1,]  1.5  1.5
[2,]  3.5  3.5

Probably the affy people should add an integer->double conversion to 
their R wrapper code for normalize.quantiles. (e.g. see last lines of
vsn/R/getIntensityMatrix.R)

Best wishes
   Wolfgang


Jeffrey Chang wrote:
> Hello everybody,
> 
> I'm using the normalize.quantiles function from the "affy" package 
> version 1.3.27, using R 1.8.1 on Mac OS X.  I'm seeing some unexpected 
> behavior when I try to normalize data read from a file.
> 
> I have a data file called "test.dat" containing:
> -------------
> 1 2
> 3 4
> -------------
> 
> When I execute the code:
> ------------------------------
> library("affy")
> 
> x <- read.table("test.dat", header=FALSE)
> y <- as.matrix(x)
> z <- matrix(c(1, 3, 2, 4), 2, 2)
> 
> print(normalize.quantiles(y))
> print(normalize.quantiles(z))
> ----------------------
> 
> I get very strange results from the first print statement.
> 
>  > source("test.R")
>                [,1]           [,2]
> [1,] -1.067217e-314 -1.067217e-314
> [2,]  1.384441e-291  1.384441e-291
>      [,1] [,2]
> [1,]  1.5  1.5
> [2,]  3.5  3.5
>  >
> 
> The values for the first normalization changes when I rerun it, so I 
> suspect it might be caused by an invalid pointer dereference.  The 
> normalize.quantiles is implemented in C in qnorm.c/R_qnorm_c.  
> Unfortunately, I don't know how R passes around matrices around, so I 
> cannot easily trace the problem further.  Has anyone seen this before?
> 
> I have attached the files "test.R" and "test.dat" containing the data 
> above.  Please let me know if mailman has stripped it, and you would 
> like me to send you a copy.
> 
> Thanks,
> Jeff
> 


-- 
-------------------------------------
Wolfgang Huber
Division of Molecular Genome Analysis
German Cancer Research Center
Heidelberg, Germany
Phone: +49 6221 424709
Fax:   +49 6221 42524709
Http:  www.dkfz.de/abt0840/whuber



More information about the Bioconductor mailing list