View source: R/consensusHeatmap.R
consensusHeatmap | R Documentation |
Based on multiple result objects from the runGSA
function,
this function computes the consensus scores, based on rank aggregation, for
each directionality class and produces a heatmap plot of the results.
consensusHeatmap( resList, method = "median", cutoff = 5, adjusted = FALSE, plot = TRUE, ncharLabel = 25, cellnote = "consensusScore", columnnames = "full", colorkey = TRUE, colorgrad = NULL, cex = NULL )
resList |
a list where each element is an object of class
|
method |
a character string selecting the method, either |
cutoff |
the maximum consensus score of a gene set, in any of the directionality classes, to be included in the heatmap. |
adjusted |
a logical, whether to use adjusted p-values or not. Note
that if |
plot |
whether or not to draw the heatmap. Setting |
ncharLabel |
the number of characters to include in the row labels. |
cellnote |
a character string selecting the information to be printed
inside each cell of the heatmap. Either |
columnnames |
either |
colorkey |
a logical (default |
colorgrad |
a character vector giving the color names to use in the heatmap. |
cex |
a numeric, to control the text size. |
This function computes the consensus gene set scores for each directionality
class based on the results (gene set p-values) listed in resList
,
using the consensusScores
function. For each class, only the
GSAres
objects in resList
that contain p-values for that class
are used as a basis for the rank aggregation. Hence, if not all classes are
covered by at least 2 GSAres
objects in the list, the
consensusHeatmap
function will not work. The results are displayed in
a heatmap showing the consensus scores.
A list, returned invisibly, containing the matrix of consensus scores as represented in the heatmap as well as the matrix of corresponding median p-values and the matrix of number of genes in each gene set (inlcuding the subset of up and down regulated genes for the mixed directional classes).
Leif Varemo piano.rpkg@gmail.com and Intawat Nookaew piano.rpkg@gmail.com
piano, runGSA
# Load some example GSA results: data(gsa_results) # Consensus heatmap: dev.new(width=10,height=10) consensusHeatmap(resList=gsa_results) # Store the output: dev.new(width=10,height=10) ch <- consensusHeatmap(resList=gsa_results) # Access the median p-values for gene set s1: ch$pMat["s1",]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.