plotCellHeatmap,scRNAseq-method {conclus} | R Documentation

## plotCellHeatmap

### Description

This function plots heatmap with marker genes on rows and clustered cells on columns.

### Usage

    plotCellHeatmap(theObject, fileName = NA, meanCentered=TRUE,
                    colorPalette="default", statePalette="default",
                    clusteringMethod="ward.D2", orderClusters=FALSE,
                    orderGenes=FALSE, returnPlot=FALSE, savePlot=FALSE, width=10,
                    height=8.5, onefile=FALSE, clusterCols=FALSE,
                    showColnames=FALSE, fontsize=7.5,  fontsizeRow=8,
                    plotPDF=TRUE, widthPNG=800, heightPNG=750, silentPlot)

### Arguments

`theObject` | A scRNAseq object with the cluster similarity matrix obtained with ?calculateClustersSimilarity method and the top markers obtained with ?retrieveTopClustersMarkers.
`fileName` | Name of the output file to which the heatmap is saved.
`meanCentered` | Boolean indicating if mean centering should be applied to the expression matrix. Default = TRUE.
`colorPalette` | A vector of colors for clusters. Default = "default", See details.
`statePalette` | A vector of colors for states or conditions. See details.
`clusteringMethod` | Clustering method passed to hclust() function. See ?hclust for a list of method. Default = "ward.D2".
`orderClusters` | If True, clusters in the similarity matrix of cells will be ordered by name. Default = FALSE.
`orderGenes` | Boolean, should the heatmap be structured by gene. Default = FALSE.
`returnPlot` | If TRUE returns a pheatmap object. Default=FALSE.
`savePlot` | If TRUE and plotPDF=TRUE, save the heatmap in pdf format. The heatmap is saved in the output directory defined in theObject (?getOutputDirectory) and in the sub-directory 'pictures'.
`width` | Width of the plot in the pdf file. See ?pdf for more details. Default = 10.
`height` | Height of the plot in the pdf file. See ?pdf for more details. Default = 8.5.
`onefile` | Logical: if TRUE allow multiple figures in one file. If FALSE, generate a file with name containing the page number for each page. Defaults to FALSE.
`clusterCols` | If TRUE, the columns representing the clusters are also taken into account in the hierarchical clustering. Default=FALSE.
`showColnames` | Shoud the names of the columns (clusters) be indicated on the heatmap. Default = FALSE.
`fontsize` | Base fontsize for the plot. Default = 7.5.
`fontsizeRow` | Fontsize for rownames. Default = 8.
`plotPDF` | If TRUE, the heatmap is saved in pdf format and in png otherwise. Default = TRUE.
`widthPNG` | Width of the png. See ?png for details. Default=800.
`heightPNG` | Height of the png. See ?png for details. Default=750.
`silentPlot` | If TRUE, does not plot the pheatmap. Default=FALSE.

### Details

colorPalette/statePalette – A vector of colors for clusters/states or 'default' value. If 'default' is selected, the number of clusters is limited to 16. If an error message is thrown, re-run the function with your own color vector.

### Value

A pheatmap object of the heatmap if returnPlot is TRUE.

### Author(s)

Ilyess RACHEDI, based on code by Polina PAVLOVICH and Nicolas DESCOSTES.

### See Also

calculateClustersSimilarity plotClusteredTSNE plotCellSimilarity plotGeneExpression plotClustersSimilarity

### Examples

    ## Object scr containing the results of previous steps
    load(system.file("extdata/scrFull.Rdat", package="conclus"))

    ## Plot the heatmap with marker genes
    plotCellHeatmap(scr)

[Package conclus version 1.2.4 Index]