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.  

