[BioC] Affymetrix background correction

Helene Boucher Helene Boucher <bouhel01@borabora.crchul.ulaval.ca>
Fri, 28 Feb 2003 10:25:29 -0500 (EST)


Hi,

I asked people at Affymetrix and when they write in their Statistical
Algorithms Description Document about background correction "The cells are
ranked and the lowest 2% is chosen as the background b for that zone (bZk)" ,
they mean to take the average of the lowest 2% for the background value for
each section. Therefore, a modification like this of the file chipbackground.c
(adding the line  bg_q[j] = sumx;) 
gives signal values more in agreement with the MAS 5.0 software.

Hélène




/**********************************************************************
**for (j=0; j < grid_dim; j++){
**  bg_q[j] = data_by_sector[j][(int)(0.02* nprobes_in_sec[j])];
**}
***********************************************************************/
  for (j=0; j < grid_dim; j++){
    sumx = 0.0;
    sumx2 = 0.0;
    lower2pc = (int)(0.02* nprobes_in_sec[j]);
    i = 0;
    while (i < lower2pc){
      sumx += data_by_sector[j][i];
      i++;
    }
    sumx = sumx/lower2pc;
    i =0;
    while (i < lower2pc){
      sumx2 += (data_by_sector[j][i] - sumx)*(data_by_sector[j][i]-sumx);
      i++;
    }
    bg_q[j] = sumx;
    noise_q[j] = sqrt(sumx2/(lower2pc -1));
  }

  free(nprobes_in_sec);
  free(cur_n);
  free(data_by_sector);
}