normalize.AffyBatch.vsn         package:vsn         R Documentation

_W_r_a_p_p_e_r _f_o_r _v_s_n _t_o _b_e _u_s_e_d _a_s _a _n_o_r_m_a_l_i_z_a_t_i_o_n _m_e_t_h_o_d _i_n _t_h_e _p_a_c_k_a_g_e _a_f_f_y

_D_e_s_c_r_i_p_t_i_o_n:

     Wrapper for 'vsn' to be used as a normalization method in the
     package affy

_U_s_a_g_e:

     normalize.AffyBatch.vsn(abatch, subsample=20000, niter = 4, ...)

_A_r_g_u_m_e_n_t_s:

  abatch: An object of type 'AffyBatch'.

subsample: The number of probes to be sampled for the fit of the
          transformation parameters.

   niter: Parameter passed on to 'vsn'.

     ...: Further parameters for 'vsn'.

_D_e_t_a_i_l_s:

     Please refer to the "details" and "references" sections of the man
     page for 'vsn' for more details about this method.

     *Important note*: after calling 'vsn', the function
     'normalize.AffyBatch.vsn' *exponentiates* the data. This is done
     in order to make the behavior of this function similar to the
     other normalization methods in affy. There, it is assumed that in
     subsequent analysis steps (e.g. in 'medianpolish'), the logarithm
     to base 2 needs to be taken.

_V_a_l_u_e:

     An object of class 'AffyBatch'.

_A_u_t_h_o_r(_s):

     Wolfgang Huber <URL: mailto:w.huber@dkfz.de>

_S_e_e _A_l_s_o:

     'vsn'

_E_x_a_m_p_l_e_s:

     library(affy)
     library(affydata)
     data(Dilution)

     ## let affy know about vsn
     normalize.AffyBatch.methods <- c(normalize.AffyBatch.methods, "vsn")

     es1 = expresso(Dilution[1:2], 
                    bg.correct       = FALSE,   ## bg correction is done by vsn
                    normalize.method = "vsn",
                    pmcorrect.method = "pmonly", 
                    summary.method   = "medianpolish")

     es2 = expresso(Dilution[1:2], 
                    bgcorrect.method = "rma",
                    normalize.method = "quantiles", 
                    pmcorrect.method = "pmonly",
                    summary.method   = "medianpolish")

     ## graphics output
     if(interactive()) x11()
     oldpar = par(mfrow=c(2,2), pch=".")

     ## extract expression values
     x1 = exprs(es1)
     x2 = exprs(es2) 
      
     ## scatter plot
     plot(x1, main="vsn: chip 3 vs 4")
     plot(x2, main="rma: chip 3 vs 4")

     ## rank(mean) - difference plot
     ylim = c(-0.7, 0.7)
     plot(rank(rowSums(x1)), diff(t(x1)), ylim=ylim, main="rank(mean) vs differences")
     abline(h=0, col="red")

     plot(rank(rowSums(x2)), diff(t(x2)), ylim=ylim, main="rank(mean) vs differences")
     abline(h=0, col="red")

     ## reset old plotting parameters 
     par(oldpar)

