Question: From DESeq2 normalized counts to heatmap in R
gravatar for dnzkursun
16 months ago by
dnzkursun10 wrote:

Hi, I have normalized counts data and DESeq2 result file (including log2FC and Padj values) of each sample. And I want to generate a heatmap of significantly differentially expressed genes (FDR<0.05; log2FC>2) in R studio. However, I could not be sure how to filter the significantly expressed genes from only these files and unfortunately, I do not have the chance to re-run the DEseq2 analysis. Can anyone give me some suggestions on data filtering and scaling options to generate heatmap?

From the DESeq2 manual, I read that VST or rlog transformation can be done before heatmap, but since I already have the normalized count data I guess converting them into Z-score can be another option? Any suggestion will be appreciated.



heatmap rna-seq deseq2 • 2.4k views
ADD COMMENTlink modified 16 months ago by i.sudbery11k • written 16 months ago by dnzkursun10
gravatar for i.sudbery
16 months ago by
Sheffield, UK
i.sudbery11k wrote:

First you definitely want to rlog or VST transform your count data, even if it is already normalized, so that should be your first step.

Your both your DESeq results table and your counts matrix should have rownames corresponding to the genes they represent. The second step is to filter the DESeq results table to grab only those rows with FDR<0.05 and abs(log2FC) > 2, and extract the rownames from the resulting table as your list of DE gene names.

Finally, use this list to subset the rlog/vst transformed count data to get the matrix that you can turn into a heatmap with heatmap.2 or ComplexHeatmap.

ADD COMMENTlink written 16 months ago by i.sudbery11k

Thank you very much for providing all the necessary information.

ADD REPLYlink written 16 months ago by dnzkursun10
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1225 users visited in the last hour