createData              package:maanova              R Documentation

_C_a_l_c_u_l_a_t_e _a_n_d _c_r_e_a_t_e _a _d_a_t_a _o_b_j_e_c_t _f_o_r _M_i_c_r_o _A_r_r_a_y _e_x_p_e_r_i_m_e_n_t

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

     This is the function to create a 'madata' object based on the
     given 'rawdata' and some parameters.

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

     createData(rawdata, n.rep=1, avgreps=0, log.trans=TRUE)

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

 rawdata: An object of class 'rawdata', which should be the result from
          'read.madata'.

   n.rep: An integer to represent the number of replicates.

 avgreps: An integer to indicate whether to average the replicates or
          not. 0 means no average; 1 means to take the mean of the
          replicates; 2 means to take the median of the replicates.

log.trans: A logical value to indicate whether to take log2
          transformation on the raw data or not. It is TRUE by default.
          But in the case that your data is pre-transformed, you need
          to set it to FALSE. If this is TRUE, 'TransformMethod' field
          will be set to "log2".

_D_e_t_a_i_l_s:

     The data integrity is checked before making the object. The number
     of rows for the data must be consistent with the number of
     replicates; the number of columns for the data must be consistent
     with the number of dyes, etc.

     Users have the option to collapse the replicated spots. Collapsing
     will be done by taking mean or median of the intensity values for
     the replicated spots. This function assumes the input data is on
     raw scale. So if your data is pre-transformed and on a log2 based,
     collapsing could be wrong.  Also note that once the replicated
     spots are collapsed, you will lose the grid location and spatial
     loess ("rlowess" option in 'transform.madata' will be unapplicable
     for it.

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

     An object of class 'madata', which is a list of following
     components: 

  n.gene: Total number of genes in the experiment.

   n.rep: Number of replicates in the experiment.

  n.spot: Number of spots for each gene.

    data: data field. It is either the log2 transformed rawdata (if
          log.trans=TRUE), or just the rawdata (if log.trans=FALSE).

  Others: All other fields in the input object of class 'rawdata'.

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

     Hao Wu

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

     #################
     # 2-dye arrays
     #################
     data(paigen)
     # create data object with replicate
     data2 <- createData(paigen.raw, n.rep=2)
     # summarize the data object
     summary(data2)
     # create data with averaging of replicates
     data1 <- createData(paigen.raw, n.rep=2, avgreps=1)
     summary(data1)

     ####################################################################
     # affy array - data is pre-transformed so log2 is skipped
     ####################################################################
     data(abf1)
     abf1 <- createData(abf1.raw, n.rep=1, log.trans=FALSE)
     summary(abf1)

