The consensus matrix is a NxN matrix, where N is the number of cells. It represents similarity between the cells based on the averaging of clustering results from all combinations of clustering parameters. Similarity 0 (blue) means that the two cells are always assigned to different clusters. In contrast, similarity 1 (red) means that the two cells are always assigned to the same cluster. The consensus matrix is clustered by hierarchical clustering and has a diagonal-block structure. Intuitively, the perfect clustering is achieved when all diagonal blocks are completely red and all off-diagonal elements are completely blue.

1 2 3 4 5 | ```
sc3_plot_consensus.SingleCellExperiment(object, k, show_pdata)
## S4 method for signature 'SingleCellExperiment'
sc3_plot_consensus(object, k,
show_pdata = NULL)
``` |

`object` |
an object of 'SingleCellExperiment' class |

`k` |
number of clusters |

`show_pdata` |
a vector of colnames of the pData(object) table. Default is NULL. If not NULL will add pData annotations to the columns of the output matrix |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.