vsn2trsf                 package:vsn                 R Documentation

_A_p_p_l_y _t_h_e _v_s_n _t_r_a_n_s_f_o_r_m_a_t_i_o_n _t_o _d_a_t_a

_D_e_s_c_r_i_p_t_i_o_n:

     Apply the vsn transformation to data.

_U_s_a_g_e:

     ## S4 method for signature 'vsn':
     predict(object, newdata, log2scale=TRUE)
     vsn2trsf(x, p, strata)

_A_r_g_u_m_e_n_t_s:

  object: An object of class 'vsn' that contains transformation
          parameters and strata information, typically this is the
          result of a previous call to 'vsn2'.

 newdata: Numeric 'matrix', 'vector' or 'ExpressionSet' with the data
          to which an existing fit is to be applied to. A typical use
          case is when the fit is made to a set of control features and
          then the transformation is to be applied to the full set of
          data. If 'newdata' is a vector, it is considered a matrix
          with one column and 'nrow(newdata)' rows.

log2scale: If 'TRUE', the data are returned on the glog scale to base
          2, and an overall offset c is added (see _Value_ section of
          the 'vsn2' manual page). If 'FALSE', the data are returned on
          the glog scale to base e, and no offset is added.

       x: Numeric matrix.

       p: An array with the transformation parameters. If 'strata' is
          specified, 'p' is expected to be a 3d array, the first
          dimension corresponds to the levels of 'strata', the second
          dimension to the columns of 'x' and the third dimension must
          be 2, corresponding to offsets and factors. If 'strata' is
          missing, then the first dimension may be omitted and 'p' can
          be a 2d array. 'NA' values are not allowed.

  strata: optional, a factor whose length is 'nrow(x)'. Can be used for
          stratified normalization (i.e. separate offsets 'a' and
          factors 'b' for each level of 'strata').

_V_a_l_u_e:

     For 'vsn2trsf', a matrix of the same size as 'x'. For 'predict', a
     matrix if 'newdata' was a matrix, and an 'ExpressionSet',
     'newdata' was an 'ExpressionSet'. Dimnames and metadata are
     preserved.

_A_u_t_h_o_r(_s):

     Wolfgang Huber <URL: http://www.ebi.ac.uk/huber>

_E_x_a_m_p_l_e_s:

     data("kidney")
     param = array(c(-0.1, -0.1, 0.003, 0.003), dim=c(1,2,2))
     tk = vsn2trsf(exprs(kidney), param)
     plot(tk, pch=".")

     ## see also the 'subsample' argument of vsn for an easier way to do this:
     fit = vsn2(kidney[sample(nrow(kidney), 500), ])
     tn = predict(fit, newdata=exprs(kidney))

