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)

