Heatmap

How to make a multi-group dotplot for single-cell RNAseq data

Dotplots are very popular for visualizing single-cell RNAseq data. In essence, the dot size represents the percentage of cells that are positive for that gene; the color intensity represents the average gene expression of that gene in a cell type. It is easy to plot one using Seurat::dotplot or Sccustomize::clustered_dotplot. However, when you have multiple groups/conditions in your data and you want to visualize it by groups, it is not that straightforward.

How to make a triangle correlation heatmap with p-values labeled

In this blog post, I am going to show you how to make a correlation heatmap with p-values and significant values labeled in the heatmap body. Let’s use the PBMC single cell data as an example. You may want to read my previous blog post How to do gene correlation for single-cell RNAseq data. Load libraries library(dplyr) library(Seurat) library(patchwork) library(ggplot2) library(ComplexHeatmap) library(SeuratData) library(hdWGCNA) library(WGCNA) set.seed(1234) prepare the data data("pbmc3k") pbmc3k #> An object of class Seurat #> 13714 features across 2700 samples within 1 assay #> Active assay: RNA (13714 features, 0 variable features) ## routine processing pbmc3k<- pbmc3k %>% NormalizeData(normalization.

A tale of two heatmap functions

You probably do not understand heatmap! Please read You probably don’t understand heatmaps by Mick Watson In the blog post, Mick used heatmap function in the stats package, I will try to walk you through comparing heatmap, and heatmap.2 from gplots package. Before I start, I want to quote this: “The defaults of almost every heat map function in R does the hierarchical clustering first, then scales the rows then displays the image”

How to make a heatmap using character matrix

People are willing to read colors. I will show you how to repesent characters in heatmap. ComplexHeatmap can directly translate a character matrix into…

Heatmap demystified part II: Using heatmap to represent continuous values

In my last blog post, I showed an example to use heatmap to represent discrete values. I am going to continue the theme to introduce heatmap to represent…

Heatmap demystified part I: use heatmap to represent discrete values

In many Genomic papers, you will see heatmaps. Heatmaps are of no mystery. It is a way to visualize the data a.k.a. using colors to represent values.…

I promised a post with heatmaps, and I delivered more with PCA, MDS and clustering

I am back from the 1st summer Institute in statistics for big data held in the university of Washington. I have learned so much!

order a matrix by a pre-defined group and then by the rowSums in R

I will lay down the R code below

log2 fold gene expression change heatmap

I was looking at two different microarray data sets. In each experiment, the authors knocked down a transcription factor (TF) and examined the gene…

reproduce k-means clustering and heatmap

I asked this question in seqanswer and biostar