maCompPlate2            package:stepNorm            R Documentation

_G_e_n_e_r_a_t_e _p_l_a_t_e _I_D_s

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

     This function is a modification of the 'maCompPlate' function in
     the 'marrayClasses' library. It generates plate IDs from the
     dimensions of the grid and spot matrices. Unlike the 'maCompPlate'
     function, the number of spots is not necessarily a multiple of the
     number of wells on a plate, therefore this function allows empty
     spots on the slide.

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

     maCompPlate2(no.plates = NULL, n = 384)

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

no.plates: object of class "numeric", number of plates used specified
          by the user. If a number is not specified, then it is assumed
          that there are no empty spots on the slide.

       n: object of class "numeric", number of wells in each plate,
          usually 384 or 96.

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

     This function can be used to handle three cases: 1) the number of
     spots is a multiple of the number of wells on a plate (usually 96
     or 384); 2) the number of spots is not a multiple of the number of
     wells on a plate, and several of spots on the slide are therefore
     left empty. In this case, the user needs to specify the number of
     total plates used; plate IDs of empty spots will be NAs; 3)the
     number of spots is not a multiple of the number of wells on a
     plate, but all spots on the slide are spotted, therefore there is
     one plate not fully used. In this case, the user does not need to
     specify the number of total plates (as this will not be an
     integer), the function assumes no empty spots on the slide
     automatically. See Examples below.

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

     The function 'maCompPlate2' returns a function with bindings for
     'no.plates' and 'n', which when receiving a object of 
     'marrayRaw', 'marrayNorm' or 'marrayLayout' class, it returns a
     vector of plate IDs ('factor').

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

     Yuanyuan Xiao

_S_e_e _A_l_s_o:

     'maCompPlate', 'marrayLayout'.

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

     ####### case 1: no empty spots on the slide, full plates used
     L<-new("marrayLayout", maNgr=4, maNgc=4, maNsr=22, maNsc=24)
     ### "compPlate" is a function
     compPlate <- maCompPlate2(n=384)
     plate <- compPlate(L)
     table(plate)
     ### can also use:
     plate<-maCompPlate(L,384)
     table(plate)

     ####### case 2: with empty spots on the slide, full plates used
     L<-new("marrayLayout", maNgr=4, maNgc=4, maNsr=22, maNsc=26)
     ### "compPlate" is a function
     compPlate <- maCompPlate2(no.plates=22,n=384)
     plate <- compPlate(L)
     table(plate)
     ### empty spots are NAs
     unique(plate)

     ###### case 3: no empty spots on the slide, one plate not full
     L<-new("marrayLayout", maNgr=4, maNgc=4, maNsr=22, maNsc=26)
     ### argument no.plates not specified, the function assumes no empty spots
     compPlate <- maCompPlate2(n=384)
     plate <- compPlate(L)
     ### 23 full plates (384), the 24th not full (304)
     table(plate)
     ### no NAs, no empty spots
     unique(plate)

