plotHeatmaps {phemd} | R Documentation

## Plot heatmap of cell subtypes

### Description

Takes as input a Phemd object containing either a Monocle2 or Seurat object (already embedded and ordered) and saves heatmap describing cell subtypes to specified folder

### Usage

    plotHeatmaps(obj, cell_model = c("monocle2", "seurat"),
      selected_genes = NULL, w = 8, h = 5, ...)

### Arguments

`obj` | 'Phemd' object containing Monocle 2 object
`cell_model` | Method by which cell state was modeled (either "monocle2" or "seurat")
`selected_genes` | Vector containing gene names to include in heatmap (optional)
`w` | Width of plot in inches
`h` | Height of plot in inches
`...` | Additional parameters to be passed on to pheatmap function

### Details

`embedCells` and `orderCellsMonocle` need to be called before calling this function. Required additional package: 'pheatmap'

### Value

Heatmap containing expression values for each cell subtype. If cell_model is 'seurat', then returns a list of heatmaps (1 for each batch) that may be subsequently plotted individually

### Examples

    my_phemdObj <- createDataObj(all_expn_data, all_genes, as.character(snames_data))
    my_phemdObj_lg <- removeTinySamples(my_phemdObj, 10)
    my_phemdObj_lg <- aggregateSamples(my_phemdObj_lg, max_cells=1000)
    my_phemdObj_lg <- selectFeatures(my_phemdObj_lg, selected_genes)
    my_phemdObj_monocle <- embedCells(my_phemdObj_lg, data_model = 'gaussianff',
    pseudo_expr=0, sigma=0.02, maxIter=2)
    my_phemdObj_monocle <- orderCellsMonocle(my_phemdObj_monocle)
    myheatmap <- plotHeatmaps(my_phemdObj_monocle, cell_model='monocle2')

[Package phemd version 1.1.1 Index]