module.heatmap: Plots heatmaps for modules

Description Usage Arguments Value See Also Examples

View source: R/module.heatmap.R

Description

This function takes as input a tree and an object from pigengene-class and per any module used in the tree, it plots one gene expression heatmap. Alternatively, it can plot a heatmap for every module in the given pigengene object.

Usage

1
2
module.heatmap(c5Tree=NULL, pigengene, mes=NULL, saveDir, testD = NULL,
  testL = NULL, pos = 0, verbose=0, doAddEigengene=TRUE, scalePngs=1, ...)

Arguments

c5Tree

A decision tree of class C50 that uses module eigengenes, or NULL. If NULL, expression plots for all modules are created.

pigengene

A object of pigengene-class, output of compute.pigengene

mes

A character vector that determines which modules to plot, e.g., c("ME3","ME5"). Set it to NULL to plot a heatmap for every module. This argument will be ignored if c5Tree is not NULL.

saveDir

Directory to save the plots

testD, testL

Optional. The matrix of (independent) test expression data, and the corresponding vector of labels. testL must be named according to the row names of testD.

pos

Number of genes to discard. Interpreted the same way as in compact.tree and preds.at

verbose

The integer level of verbosity. 0 means silent and higher values produce more details of computation.

doAddEigengene

If TRUE, the eigengene of each module will be added to the corresponding heatmap.

scalePngs

If not 1, the size of pngs will be adjusted using this parameter. A typical value would be 7.

...

Additional arguments. Passed to pheatmap.type

Value

A list of:

call

The call that created the results

saveDir

An echo of the input argument determining where the plots are saved

See Also

Pigengene-package, make.decision.tree, compact.tree, compute.pigengene

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
     ## Data:
     data(aml)
     data(mds)
     data(pigengene)
     d1 <- rbind(aml,mds)

     ## Plotting the heatmaps of all modules:
     module.heatmap(pigengene=pigengene, saveDir="heatmaps", pos=0, verbose=1)
    
     ## Fiting the trees:
     trees <- make.decision.tree(pigengene=pigengene, Data=d1,
       saveDir="trees", minPerLeaf=14:15, doHeat=FALSE,verbose=3,
       toCompact=15)

     ## Plotting the heatmaps of only the modules in the tree:
     module.heatmap(c5Tree=trees$c5Trees[["15"]], pigengene=pigengene, 
         saveDir="treeHeatmaps", pos=0, verbose=1)

Pigengene documentation built on Nov. 8, 2020, 6:47 p.m.