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))

