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(factor(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(factor(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(factor(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)

