resplot                package:GSEAlm                R Documentation

_S_i_m_p_l_e _G_r_a_p_h_i_c_a_l _S_u_m_m_a_r_i_e_s _f_o_r _G_e_n_e _S_e_t _E_n_r_i_c_h_m_e_n_t _A_n_a_l_y_s_i_s
(_G_S_E_A)

_D_e_s_c_r_i_p_t_i_o_n:

     Diagnostic plots for GSEA. 'resplot' and 'restrip' group residuals
     (or expression levels) from a specific gene-set by sample.
     'mnDiffPlot' shows mean expression differences for a dichotomous
     phenotype, by gene, for a specific gene set.

_U_s_a_g_e:

     resplot(GSname = "All", resmat, incidence = dumminc(resmat), fac, 
          atomic = "Gene", core.text = "Residuals by Sample", 
          yname = "Standardized Residual", xname = "Sample ID", 
          ID = colnames(resmat), lims = 0, gnames = levels(fac), 
          prefix = "", horiz = FALSE, colour=5,pch='+',...)

     restrip(GSname = "All", resmat, incidence = dumminc(resmat), fac,
        atomic = "Gene", core.text = "Residuals by Sample", 
       yname = "Standardized Residual", xname = "Sample ID", ID = colnames(resmat),
       gnames = levels(fac), prefix = "", colour=c(2:4,6), resort=TRUE, 
       horiz = FALSE, resort.fun=num.positive, pch='+', ...)

     mnDiffPlot(GSname = "All", exprmat, incidence = dumminc(exprmat), fac, 
       atomic = "Gene", core.text = paste("Mean Expression Difference by",atomic), 
       yname="Log Expression Ratio", xname="Log Expression",
       gnames = levels(fac), prefix = "", fitline=FALSE, varsize=FALSE,
       reverse=FALSE, ...)

_A_r_g_u_m_e_n_t_s:

  GSname: Gene-set Name. See "Details".

resmat,exprmat: Numerical matrix with the values to be plotted. See
          "Details". 

incidence: Gene-set 0/1 membership matrix 

     fac: The phenotypical variable to plot by. Must be discrete. For
          'mnDiffPlot', must be dichotomous.

  atomic: string identifying the meaning of rows in the data matrix.
          Defaults to "Gene". 

core.text,gnames,prefix,xname,yname: strings controlling the text of
          main and axis captions 

      ID: Group names associated with the data matrix columns 

    lims: plotting limits for the response axis

   horiz: logical: whether the boxplots or strips should be horizontal
          (defaults to FALSE)

  colour: color of boxplot filling ('resplot') or symbols ('restrip')

     pch: the plotting symbol

  resort: 

resort.fun: ('restrip' only) what function to sort groups by. Ignored
          unless 'resort==TRUE'. See 'stripchart' documentation for
          more details

 fitline: ('mnDiffPlot' only) logical: whether a loess fit should be
          plotted

 varsize: ('mnDiffPlot' only) logical: whether symbol sizes should be
          proportional to (t-test style) standard errors

 reverse: ('mnDiffPlot' only)logical: whether the factor's order should
          be reversed so that the second level is on the x-axis rather
          than the first one

     ...: Additional graphical parameters passed on to the generic
          plotting functions.

_D_e_t_a_i_l_s:

     These functions provide simple graphical summaries for processed
     gene-expression data, or other similar datasets for which matrix
     form is useful. They are tailored predominantly for GSEA, but are
     useful in general as well.

     'resplot' calls 'boxplot' and 'restrip' calls 'stripchart'; both
     summarize *all* data points from those rows in 'resmat' which are
     members in the gene-set specified by 'GSname'. The summary is by
     column. For each level of 'fac' there will be a separate pane.

     'mnDiffPlot' calls 'plot'; it plots the mean differences, by row,
     between columns belonging to the two groups specified by 'fac', as
     a function of the mean values for the first group alone. Each row
     translates to a single point on the graph. Again, the summary is
     only for rows indicated by 'GSname'.

     For gene-set selective plots to properly work, the incidence
     matrix needs to have non-empty row names, and 'GSname' must match
     one of them.

     If both 'GSname' and 'incidence' are left blank, automatic
     utilities are called which help generate a summary of the entire
     matrix, by column.

     All functions plot a reference line signalling zero. 'mnDiffPlot'
     also optionally plots a loess fit for expression differences (if
     'fitline=TRUE').

_N_o_t_e:

     One can use 'resplot'/'restrip' to plot raw expression values
     rather than residuals; it all depends on what's in the data
     matrix.

_A_u_t_h_o_r(_s):

     Assaf Oron

_S_e_e _A_l_s_o:

     'boxplot','plot','stripchart','par','GOmnplot'

_E_x_a_m_p_l_e_s:

     data(sample.ExpressionSet)
     lm1 = lmPerGene(sample.ExpressionSet,~sex)
     r1 = getResidPerGene(lm1)
     ### now a boxplot of all residuals by sample
     resplot(resmat=exprs(r1),fac=sample.ExpressionSet$sex)
     ### This plot is not very informative because of some gross outliers;
     ### try this instead
     resplot(resmat=exprs(r1),fac=sample.ExpressionSet$sex,lims=c(-5,5))

     ### stripchart for first 10 genes
     restrip(resmat=exprs(r1)[1:10,],fac=sample.ExpressionSet$type,prefix="Not")

     ### note the wild trajectory of the loess fit:
     mnDiffPlot(exprmat=exprs(sample.ExpressionSet),fac=sample.ExpressionSet$type,xname="Raw Expression",yname="Expression Difference",fitline=TRUE)

