id2image                 package:sma                 R Documentation

_C_o_n_v_e_r_t_i_n_g _a_n _i_d _t_a_g _t_o _a _S_e_t _o_f _I_m_a_g_e _C_o_o_r_d_i_n_a_t_e_s _a_n_d _V_i_c_e _V_e_r_s_a

_D_e_s_c_r_i_p_t_i_o_n:

     The function 'id2image' converts an id tag of a gene supplied by a
     user into a set of image coordinates regarding the location of the
     gene being  considered. Conversion of image coordinates to an id
     tag is performed by 'image2id'.

_U_s_a_g_e:

     id2image(X, layout)
     image2id(x, layout)

_A_r_g_u_m_e_n_t_s:

       X: an integer value representing the id of a particular gene

  layout: 

       x: a vector of 4 integer elements which make up the image
          coordinates of the gene.

_D_e_t_a_i_l_s:

     The image coordinates of a gene correspond to the gene's grid row
     and grid column position within a slide, and the gene's row and
     column position within a grid.

_V_a_l_u_e:

     'id2image' returns a vector of 4 integer elements which is the set
     of image coordinates.  'image2id' returns an integer value which
     is the gene's id tag.

_A_u_t_h_o_r(_s):

     Yee Hwa Yang, yeehwa@stat.berkeley.edu

_S_e_e _A_l_s_o:

     'MouseArray'

_E_x_a_m_p_l_e_s:

     data(MouseArray)
     # mouse.setup <- init.grid()

     id2image(1024, mouse.setup)
     ## You will see: [1]  1 3 11 16
     ## the grid in which gene 1024 can be found, is in row 1, column 3
     ## and the gene is located in row 11, column 16 of this particular grid.
      
     image2id(c(2,4,6,8), mouse.setup)
     ## You will see: [1] 2906
     ## the gene located in row 6, column 8 in the grid that is in row 2 and
     ## column 4 is the 2906th gene of the data set.  

