m2v                   package:OLIN                   R Documentation

_C_o_n_v_e_r_t_s _m_a_t_r_i_x _t_o _v_e_c_t_o_r _b_a_s_e_d _o_n _s_p_o_t _l_a_y_o_u_t

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

     This function converts a matrix based on the spatial layout of
     spots to a vector. Optionally, a 2D-plot is produced.

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

     m2v(M,Ngc,Ngr,Nsc,Nsr,visu=FALSE,color.lim=c(-1,1),xlab="Columns",ylab="Rows",...)

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

       M: Matrix of real values 

     Ngc: number of columns for the grid matrix

     Ngr: number of rows for the grid matrix

     Nsc: number of columns for the spot matrix

     Nsr: number of rows for the spot matrix

    visu: If TRUE, MXY plot is generated.

color.lim: limits of colour range for 2D-plot

    xlab: label of x -axis of 2D-plot

    ylab: label of y-axis of 2D-plot

     ...: Further optional parameters  for the 'image' function
          generating the MXY plot

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

     The function 'm2v' rearranges the values of  a matrix 'M'
     corresponding to the intensity values on the array  to a vector
     'V'. The matrix 'M' may have been generated by e.g. 'v2m'. The
     order of values in 'V' follows the convention of _marrayRaw_
     objects.  In fact, the transformation of 'm2v' is the reverse of
     'v2m' (assuming the  arguments are kept the same.) Note that these
     functions assume a specific mapping between the data points and
     the location of spot (i.e. the same mapping rule that is used for
     _marrayRaw/marrayNorm_ objects.) The validity of the mappings
     should be  carefully checked (see also the documentation of the
     _marray_ package.)   The option for spatial visualisation is
     rather restricted to logged fold-changes as the corresponding
     colour range is centred around zero and follows the conventional
     colouring (green for negative, red for positive fold-changes). The
     MXY plot produced by 'm2v' does not include a colour-bar. To have
     a colour included, 'mxy.plot' can be used.

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

     A vector 'V' of length  '((Ngc*Nsc)*(Ngr*Nsr))' is produced. The
     values of 'V' represents the spatial distribution of the values of
     vector 'V' given the print-layout. Optionally, a 2D-plot of 'M' is
     generated.

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

     Matthias E. Futschik (<URL:
     http://itb.biologie.hu-berlin.de/~futschik>)

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

     'v2m', 'mxy.plot'

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

     # LOADING DATA NOT-NORMALISED
     data(sw) 
     # CONVERSION FROM VECTOR TO MATRIX
     M <- v2m(maM(sw)[,1],Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)

     # BACK-CONVERSION FROM MATRIX TO VECTOR
     V <- m2v(M,Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)

