[BioC] quantile normalization

Ben Bolstad bolstad at stat.berkeley.edu
Wed Jun 4 05:11:03 MEST 2003


Ties are not generally much of a problem. But below demonstrates how it
is handled in the affy normalize.quantiles() routine


> while affy 
> treats all tied values as having the minimum of the tied ranks:

When you have an even number of ties this is true (ranks are rounded
down so with 2 ties the above would happen). With an odd number of ties
a whole number rank is used eg


> # odd number of ties
> X <- matrix(c(1:8,1,2,3,4,5,5,5,8),8,2)
> X
     [,1] [,2]
[1,]    1    1
[2,]    2    2
[3,]    3    3
[4,]    4    4
[5,]    5    5
[6,]    6    5
[7,]    7    5
[8,]    8    8
> normalize.quantiles(X)
     [,1] [,2]
[1,]  1.0  1.0
[2,]  2.0  2.0
[3,]  3.0  3.0
[4,]  4.0  4.0
[5,]  5.0  5.5
[6,]  5.5  5.5
[7,]  6.0  5.5
[8,]  8.0  8.0
>
> rank(c(1,2,3,4,5,5,5,8))
[1] 1 2 3 4 6 6 6 8
># so rank of 6 used for ties



># even number of ties
> X <- matrix(c(1:8,1,2,3,4,5,5,7,8),8,2)
> X
     [,1] [,2]
[1,]    1    1
[2,]    2    2
[3,]    3    3
[4,]    4    4
[5,]    5    5
[6,]    6    5
[7,]    7    7
[8,]    8    8

> normalize.quantiles(X)
     [,1] [,2]
[1,]  1.0    1
[2,]  2.0    2
[3,]  3.0    3
[4,]  4.0    4
[5,]  5.0    5
[6,]  5.5    5
[7,]  7.0    7
[8,]  8.0    8

> rank(c(1,2,3,4,5,5,7,8))
[1] 1.0 2.0 3.0 4.0 5.5 5.5 7.0 8.0
> # so rank rounded down to 5




Thanks,

Ben



More information about the Bioconductor mailing list