What the Color is in heatmap for time series analysis
2
0
Entering edit mode
7.8 years ago
rahel14350 ▴ 40

Dear all,

I did DEG analysis for two condition with 5 time points using deseq2. In heatmap I have one colour for each DEG with lowest p- value which represent log2 fold change (wald test) for each deg in time 0.

My question is that I have 4 sample in time point 1 vs 4 sample in time 0. But I see only one colour for all, as time0-vs-1.

Is this colour from mean or median of all LFCs of 4 samples? Or there is an algorithm behind that in heatmap?

Many thanks in advance for your help,

Cheers,
Rahel

deseq2 heatmap time-series • 3.2k views
ADD COMMENT
0
Entering edit mode

A picture is always better than a hundred words. Consider posting an example image.

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode
7.8 years ago
ivivek_ngs ★ 5.2k

Can you be a bit more clear about what you want to see and show an image of your output as of now. It should be pretty straightforward to select the top 500 DEGs from your analysis and fish out the FPKM/TPM from the expression matrix for these genes across all the samples with various time points and then use pheatmap to represent these genes with annotation of the conditions and the time-series. Take a look at this link. You should be doing something similar to this. Also take a look at this blog as how to implement annotation which you should be doing for your time and conditions in order to cluster the data.

ADD COMMENT
0
Entering edit mode

Dear vchris,

Many thanks for your reply. I have a heatmap like the one in your link and each colour bulk represent the normalized read count of the genes with lowest p-value and colored by LFC.

enter image description here

But when I make the pheatmap with exact command from Deseq2:

opGenes <- head(order(resTC$padj),50)

mat <- betas[topGenes, -c(1,2)]

thr <- 3 

mat[mat < -thr] <- -thr

mat[mat > thr] <- thr

pheatmap(mat,breaks=seq(from=-thr, to=thr, length=101),border_color="NA",cluster_col=FALSE)

I get one color bulk for each of time point comparison to time 0.

enter image description here

My question is that how from 4 replicate per time point, I got one colour bulk per time point? I hope I made it clear. Cheers, Rahel

ADD REPLY
0
Entering edit mode

Please change the formatting of the code so that it is intelligible. Please take a look at how to write in Biostars which should be a good start for you so that you can ask specific questions with proper clarity and we can understand your query and address it to the best of our capabilities. How to insert image in Biostars?

In any case how is the design of your experiment done in DESeq2. There are links which I am putting here for your reference which should be the way you should perform the time-series DE analysis. Take a look at here. Then if you directly want to use from DESeq2 the pheatmap function for the normalized counts here is a way it is being done. To be very precise what I would suggest is to get the DE list of genes across replicates across time points with their expression value (this expression value can be FPKM/TPM/RPKM/cpm). Create this matrix and then try to annotate the header with two vectors that symbolizes the groups for time series(0h,4h,8h,16h..) and one that shows the two different conditions. Use them to plot the heatmap for the DE genes with pheatmap, adding the annotation function, you should be able to see it. Not all times the normalized data of DESeq2 might be able to give you the perfect visualization. That is the reason we create TPM/FPKM and view the genes on these expression values. The pheatmap will compute the z-scores and do the needful for you.

ADD REPLY
0
Entering edit mode

Dear Vchris,

Many thanks for your prompt and informative reply. I did correct the post, hope it is in the right order now. I am going through your links and comments now to reach my answer. Cheers, Rahel

ADD REPLY
1
Entering edit mode

You already have your answer in the bioconductor post where the DESeq2 author @Michael Love replied. I was unable to understand your query but the second is the plot of log2 fold change value with 4vs4 . So you see one cell representation.

ADD REPLY
0
Entering edit mode
7.8 years ago
EagleEye 7.5k

It will be nice to use,

  1. RPKM/FPKM values or any normalized expression values

  2. Calculate z-score

  3. Use pheatmap to see clear picture of your time-series data.

ADD COMMENT

Login before adding your answer.

Traffic: 2527 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6