plotPlate               package:prada               R Documentation

_P_l_o_t _a _w_e_l_l _s_t_a_t_i_s_t_i_c _i_n _f_a_l_s_e _c_o_l_o_r _r_e_p_r_e_s_e_n_t_a_t_i_o_n.

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

     Plot a well statistic in false color representation. The plot is
     supposed to resemble the physical geometry of a microtitre plate.

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

     plotPlate(x, nrow = 8, ncol = 12, ind = 1:(ncol*nrow), main, xrange,
               col, device, file, width, na.action = "zero",
               desc = as.character(c(NA, NA)), char)

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

       x: Numeric vector of length 'ncol*nrow' (except if argument
          'ind' is specified).

    nrow: Numeric of length 1. The number of rows of the plate.

    ncol: Numeric of length 1. The number of columns of the plate.

     ind: Optional integer vector of equal length as 'x'. It indicates
          the position of the respective value of x on the plate. Can
          be used to adress the problem of missing values. Each well
          that is not allocated a value of 'x' by 'ind' will not be
          plotted.

    main: Character of length 1. Plot title. This arguments gets passed
           on to 'text' as the argument 'labels'.

  xrange: Range of 'x' that is mapped into the color scale.

     col: Character vector. Usually the names of two or three colors
          between which the color map is interpolated, using the
          function 'colorRampPalette'.

  device: Character. Name of a valid graphics device, e.g. 'x11',
          'png', 'pdf'.

    file: The 'file' argument of the call to 'device', i.e. the name of
          the graphics output file.

   width: The 'width' argument of the call to  'device', i.e. the width
          of the graphic.

na.action: Character. One of '"zero"' '"omit"' or '"xout"'. How should
          the wells for which 'x' is NA be treated? For '"zero"', they
          are plotted as if the value were 0.  For '"omit"', they are
          omitted. For '"xout"', they are crossed out.

    desc: Character of length 2. Legend for the two ends of the
          colorbar, e.g. 'act' and 'inh'. 

    char: An optional character vector of equal length as 'x' (except
          if argument 'ind' is specified). Each element of the vector
          may contain one single 'char' to be superimposed on the
          respective well or 'NA' for no plotting.

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

     Argument'ind' allows the user to indicate the position (well
     number) for each element of vector 'x' on the plate. This can be
     used either to change the order in which elements of 'x' are to be
     plotted or to deal with the problem of missing data for some of
     the wells on a plate.

     To further increase the amount of information of the platePlot one
     may decorate wells with single characters using argument 'char'.
     Each element of 'char' '!= NA' will be superimposed on the
     respective well (see examples).

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

     The function produces a plot in the graphics device specified by
     the 'device' argument.  

     It returns a list with two elements. The element 'which' is a
     vector with the indices of those elements in 'x' that were plotted
     (see argument 'na.action'). The element 'coord' is a
     'length(which)' by 4 matrix in which each row specifies the
     corners of a rectangle that contains a well. It is intended to be
     use as an argument to a subsequent call to 'imageMap'.

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

     Wolfgang Huber <URL: http://www.ebi.ac.uk/huber>

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

     'imageMap'

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

     plotPlate(runif(96), main="example 1", col=c("#0000e0", "#e00000"), width=7, desc=c("act", "inh"))
     plotPlate(runif(384), nrow=16, ncol=24, main="example 2", col=c("#0000e0", "white", "#e00000"), width=7)
     plotPlate(runif(48), main="example 3", col=c("#0000e0", "#e00000"), width=7, ind=c(1:24, 73:96))
     x <- runif(96)
     x[sample(96, 10)] <- NA
     plotPlate(x, main="example 4", col=c("#0000e0", "#e00000"), width=7, char=c(rep(NA, 72), LETTERS[1:24]), na.action="xout")

