plotDensities             package:limma             R Documentation

_I_n_d_i_v_i_d_u_a_l-_c_h_a_n_n_e_l _D_e_n_s_i_t_i_e_s _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     Plots the densities of individual-channel intensities for
     two-color microarray data.

_U_s_a_g_e:

     plotDensities(object, log=TRUE, arrays=NULL, singlechannels=NULL, groups=NULL, col=NULL) 

_A_r_g_u_m_e_n_t_s:

  object: an 'RGList' or 'MAList' object. 'RGList' objects containing
          logged or unlogged intensities can be accommodated using the
          'log.transform' argument.

     log: logical, should densities be formed and plotted for the
          log-intensities ('TRUE') or raw intensities ('FALSE')?

  arrays: vector of integers giving the arrays from which the
          individual-channels will be selected to be plotted.
          Corresponds to columns of 'M' and 'A' (or 'R' and 'G'). 
          Defaults to all arrays.

singlechannels: vector of integers indicating which individual-channels
          will be selected to be plotted.  Values correspond to the
          columns of the matrix of 'cbind(R,G)' and range between
          '1:ncol(R)' for red channels and '(
          (ncol(R)+1):(ncol(R)+ncol(G)) )' for the green channels in
          'object'. Defaults to all channels.

  groups: vector of consecutive integers beginning at 1 indicating the
          groups of arrays or individual-channels (depending on which
          of 'arrays' or 'singlechannels' are non 'NULL').  This is
          used to color any groups of the individual-channel densities.
          If 'NULL' (default), 'groups' correspond to the red and green
          channels.  If both 'arrays' and 'singlechannels' are 'NULL'
          all arrays are selected and groups (if specified) must
          correspond to the arrays.

     col: vector of colors of the same length as the number of
          different groups. If 'NULL' (default) the 'col' equals
          'c("red","green")'.  See details for more specifications.

_D_e_t_a_i_l_s:

     This function is used as a data display technique associated with
     between-array normalization, especially individual-channel
     normalization methods such as quantile-normalization. See the
     section on between-array normalization in the LIMMA User's Guide.

     If no 'col' is specified, the default is to color individual
     channels according to red and green. If both 'arrays' and 'groups'
     are non-'NULL', then the length of 'groups' must equal the length
     of 'arrays' and the maximum of 'groups' (i.e. the number of
     groups) must equal the length of 'col' otherwise the default color
     of black will be used for all individual-channels. If 'arrays' is
     'NULL' and both 'singlechannels' and 'groups' are non-'NULL', then
     the length of 'groups' must equal the length of 'singlechannels'
     and the maximum of 'groups' (i.e. the number of groups) must equal
     the length of 'col' otherwise the default color of black will be
     used for all individual-channels.

_V_a_l_u_e:

     A plot is created on the current graphics device.

_A_u_t_h_o_r(_s):

     Natalie Thorne

_S_e_e _A_l_s_o:

     An overview of diagnostic plots in LIMMA is given in
     09.Diagnostics. There is a section using 'plotDensities' in
     conjunction with between-array normalization in the _LIMMA User's
     Guide_.

_E_x_a_m_p_l_e_s:

     library(sma)
     data(MouseArray)

     #  no normalization but background correction is done
     MA.n <- MA.RG(mouse.data)

     #  Default settings for plotDensities.
     plotDensities(MA.n)

     #  One can reproduce the default settings.
     plotDensities(MA.n,arrays=c(1:6),groups=c(rep(1,6),rep(2,6)),
     col=c("red","green"))

     #  Color R and G individual-channels by blue and purple.
     plotDensities(MA.n,arrays=NULL,groups=NULL,col=c("blue","purple"))

     #  Indexing individual-channels using singlechannels (arrays=NULL).
     plotDensities(MA.n,singlechannels=c(1,2,7))

     #  Change the default colors from c("red","green") to c("pink","purple")
     plotDensities(MA.n,singlechannels=c(1,2,7),col=c("pink","purple"))

     #  Specified too many colors since groups=NULL defaults to two groups.
     plotDensities(MA.n,singlechannels=c(1,2,7),col=c("pink","purple","blue"))

     #  Three individual-channels, three groups, three colors.
     plotDensities(MA.n,singlechannels=c(1,2,7),groups=c(1,2,3),
     col=c("pink","purple","blue"))

     #  Three individual-channels, one group, one color.
     plotDensities(MA.n,singlechannels=c(1,2,7),groups=c(1,1,1),
     col=c("purple"))

     #  All individual-channels, three groups (ctl,tmt,reference), three colors.
     plotDensities(MA.n,singlechannels=c(1:12),
     groups=c(rep(1,3),rep(2,3),rep(3,6)),col=c("darkred","red","green"))

