Skip to contents

Plot a summary of multiple tmod analyses


  pie = NULL,
  clust = "qval",
  select = NULL,
  filter.empty.cols = FALSE,
  filter.empty.rows = TRUE,
  filter.unknown = TRUE,
  filter.rows.pval = 0.05,
  filter.rows.auc = 0.5, = NULL,
  col.labels = NULL, = "top",
  row.labels = NULL, = "both",
  pval.thr = 10^-2,
  pval.thr.lower = 10^-6,
  plot.func = NULL,
  grid = "at",
  pie.colors = c("#0000FF", "#cccccc", "#FF0000"),
  plot.cex = 1,
  text.cex = 1, = "auto",
  min.e = 0.5,
  max.e = 1, = "auto",



either a list, in which each element has been generated with a tmod test function, or the result of the tmodSummary function


a list of data frames with information for drawing a pie chart


whether, in the resulting data frame, the modules should be ordered by clustering them with either q-values ("qval") or the effect size ("effect"). If "sort" or NULL, the modules are sorted alphabetically by their ID. If "keep", then the order of the modules is kept.


a character vector of module IDs to show. If clust == "keep", then in that particular order.


If TRUE, all elements (columns) with no enrichment below pval.thr in any row will be removed


If TRUE, all modules (rows) with no enrichment below pval.thr in any column will be removed


If TRUE, modules with no annotation will be omitted


Rows in which no p value is below this threshold will be omitted


Rows in which no AUC value is above this threshold will be omitted

if provided, show only modules with IDs in this character vector


Labels for the columns. If NULL, names of the elements of the list x will be used.

Style of column names: "top" (default), "bottom", "both", "none"


Labels for the modules. This must be a named vector, with module IDs as vector names. If NULL, module titles from the analyses results will be used.

Automatic generation of row labels from module data: "both" or "auto" (default, ID and title), "id" (only ID), "title" (only title), "none" (no row label)


Results with p-value above pval.thr will not be shown


Results with p-value below pval.thr.lower will look identical on the plot


Optionally, a function to be used to draw the dots. See "pvalEffectPlot"


Style of a light-grey grid to be plotted; can be "none", "at" and "between"


character vector of length equal to the cardinality of the third dimension of the pie argument. By default: blue, grey and red.


a numerical value giving the amount by which the plot symbols will be maginfied


a numerical value giving the amount by which the plot text will be magnified, or a vector containing three cex values for row labels, column labels and legend, respectively

Can be "auto" (default), "dot", "symdot", "pie", "boxpie", "rug" (see Details)

min.e, max.e

scale limits for the effect size (default: 0.5 and 1.0)

Style of the legend: "auto" -- automatic; "broad": pval legend side by side with effect size legend; "tall": effect size legend above pval legend


Any further arguments will be passed to the pvalEffectPlot function (for example, grid.color)


a data frame with a line for each module encountered anywhere in the list x, two columns describing the module (ID and module title), and two columns(effect size and q value) for each element of list x.


This function is useful if you run an analysis for several conditions or time points and would like to summarize the information on a plot. You can use lapply() to generate a list with tmod results and use tmodPanelPlot to visualize it.

tmodPanelPlot shows a heatmap-like plot. Each row corresponds to one module, and columns correspond to the time points or conditions for which the tmod analyses were run. Each significantly enriched module is shown as a red dot. Size of the dot corresponds to the effect size (for example, AUC in the CERNO test), and intensity of the color corresponds to the q-value.

By default, tmodPanelPlot visualizes each the results of a single statistical test by a red dot, or blue and red dots if the effect sizes are both negative and positive. However, it is often interesting to know how many of the genes in a module are significantly up- or down regulated. tmodPanelPlot can draw a pie chart based on the optional argument "pie". The argument must be a list of length equal to the length of x. Note also that the names of the pie list must be equal to the names of x. Objects returned by the function tmodDecideTests can be directly used here. The rownames of either the data frame or the array must be the module IDs.

See also

tmodDecideTests, tmodSummary, pvalEffectPlot, simplePie


E <- Egambia[,-c(1:3)]
pca <- prcomp(t(E), scale.=TRUE)

# Calculate enrichment for first 5 PCs
gs   <- Egambia$GENE_SYMBOL
gn.f <- function(r) {
    o <- order(abs(r), decreasing=TRUE)
x <- apply(pca$rotation[,3:4], 2, gn.f)
tmodPanelPlot(x, text.cex=0.7)