plotMDS                package:limma                R Documentation

_M_u_l_t_i_d_i_m_e_n_s_i_o_n_a_l _s_c_a_l_i_n_g _p_l_o_t _o_f _m_i_c_r_o_a_r_r_a_y _d_a_t_a

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

     Plot the sample relations based on MDS.

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

     plotMDS(x, top=500, labels=colnames(x), col=NULL, cex=1, dim.plot=c(1,2), ndim=max(dim.plot),...)

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

       x: any data object which can be coerced to a matrix, such as
          'ExpressionSet' or 'EList'.

     top: number of top genes used to calculate pairwise distances.

  labels: character vector of sample names or labels. If 'x' has no
          column names, then defaults the index of the samples.

     col: numeric or character vector of colors for the plotting
          characters.

     cex: numeric vector of plot symbol expansions.

dim.plot: which two dimensions should be plotted, numeric vector of
          length two.

    ndim: number of dimensions in which data is to be represented

     ...: any other arguments are passed to 'plot'.

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

     This function is a variation on the usual multdimensional scaling
     (or principle coordinate) plot, in that a distance measure
     particularly appropriate for the microarray context is used. The
     distance between each pair of samples (columns) is the
     root-mean-square deviation for the top 'top' genes which best
     distinguish that pair of samples. That is, Euclidean distance is
     used, but for a different gene subset for each pair of samples.

     See 'text' for possible values for 'col' and 'cex'.

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

     A plot is created on the current graphics device.

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

     Di Wu and Gordon Smyth

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

     'cmdscale'

     An overview of diagnostic functions available in LIMMA is given in
     09.Diagnostics.

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

     # Simulate gene expression data for 1000 probes and 6 microarrays.
     # Samples are in two groups
     # First 50 probes are differentially expressed in second group
     sd <- 0.3*sqrt(4/rchisq(1000,df=4))
     x <- matrix(rnorm(1000*6,sd=sd),1000,6)
     rownames(x) <- paste("Gene",1:1000)
     x[1:50,4:6] <- x[1:50,4:6] + 2
     # without labels, indexes of samples are plotted.
     plotMDS(x,  col=c(rep("black",3), rep("red",3)) )
     # with labels as groups, group indicators are plotted.
     plotMDS(x,  col=c(rep("black",3), rep("red",3)), labels= c(rep("Grp1",3), rep("Grp2",3)))

