plotClustersSimilarity,scRNAseq-method {conclus} | R Documentation

## plotClustersSimilarity

### Description

This function plots the clusters similarity matrix as a heatmap.

### Usage

    plotClustersSimilarity(theObject, colorPalette="default",
    statePalette="default", clusteringMethod="ward.D2", returnPlot=FALSE,
    savePlot=FALSE, plotPDF=TRUE, width=7, height=5.5, onefile=FALSE,
    fontsize=7.5, widthPNG=800, heightPNG=750, silentPlot=FALSE)

### Arguments

`theObject` | A scRNAseq object with the cluster similarity matrix obtained with ?calculateClustersSimilarity.
`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"
`returnPlot` | Boolean indicating if the pHeatmap object should be returned by the function. 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'.
`plotPDF` | If TRUE, the heatmap is saved in pdf format and in png otherwise. Default = TRUE.
`width` | Width of the plot in the pdf file. See ?pdf for more details. Default = 7.
`height` | Height of the plot in the pdf file. See ?pdf for more details. Default = 5.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.
`fontsize` | pheatmap parameter. Base fontsize for the plot. Default=7.5.
`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. This is useful if one wants to only retrieve the object to insert the figure in a grid for instance.

### 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 clusters similarity matrix.

### Author(s)

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

### See Also

calculateClustersSimilarity plotClusteredTSNE plotCellHeatmap plotGeneExpression plotCellSimilarity

### Examples

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

    ## Plot similarity matrix as a heatmap
    plotClustersSimilarity(scr)

[Package conclus version 1.2.4 Index]