Entering edit mode
15 months ago
Chris
▴
340
Hi all,
degs = rownames(subset(DEG, PValue < 0.05 & abs(logFC > 9)))
rownames(counts) = DEG[rownames(counts), 'symbol']
counts_degs = counts[degs,]
pheatmap(counts_degs, clustering_method = 'ward.D', scale='row')
Could I use TPM matrix instead of raw count matrix to make heat map using the code above? Which I think it makes more sense. Thank you so much! My DEG is as the photo.
Your code is faulty:
abs(logFC > 9)
should beabs(logFC) > 9
, I think. Also, I can't really understand your question - you can make a heatmap of anything. You mention "non replicate" but you're running DESeq2. How are you doing that?Thank you for showing me the error! I used edgeR:
I try to find differential gene expression that why I think TPM is better than the raw count.
What is the relationship between differential gene expression and TPM? Where does it say that TPM is better than raw count at diff. expression analysis?
I thought that people use RPKM, TPM or CPM to estimate differential gene expression, is that correct?
That is not correct. All of those metrics quantify relative gene expression within a sample.
Comparison across samples may be problematic but could we use it as a reference or estimate and may be validate again later on? I just want to make a heat map to see gene expression between 4 samples and use raw count is not make sense. Thank you for your reply!
I do this heatmap thing all the time. If cross-sample comparison is all you're interested in, I'd recommend UQ normalizing raw counts or using normalized counts from DESeq2. For cross-gene comparison, TPM will work. To combine both, I use a modified version of the UQpgQ2 method: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5411036/, where instead of normalizing by median (Q2) in step-2, I normalize by median of all expressors to retain more genes. A better way would be to UQ normalize across samples, then calculate z-scores per gene.
I found an interesting discussion here How to choose Normalization methods (TPM/RPKM/FPKM) for mRNA expression. Thank you for sharing! What do you think about voom?
https://ucdavis-bioinformatics-training.github.io/2018-June-RNA-Seq-Workshop/thursday/DE.html
When I use y$E to make heat map, I don't have logFC to filter out to make the heat map less dense.
I don't have any thoughts about voom but please note the replies on Novogene's post - Novogene's take is bad/outdated. Don't go by what they say.
EDIT: That is an awfully short discussion - the forum has a lot more discussions on this topic and the post you've picked is one of the least informative (except for i.sudbery's takes). Dig deeper - make a heatmap from whatever but don't expect the heatmap to be statistically sound.
Thank you for letting me know! That post pop up because it mentioned about UQpgQ2.
Yeah, that comment is from me as well - I'm probably the only person mentioning that metric on this site.