Create Heat Map Using Edger Output Data
2
3
Entering edit mode
10.9 years ago
nbvasani ▴ 240

Hi Users,

Using edgeR, I got file with 4 different values i.e logFC, logCPM, Pvalue, FDR. How do I create heatmap using above values?

Any suggestion would be appreciated.

Thanks,
Naresh

edger r RNA-seq • 22k views
3
Entering edit mode
10.9 years ago
Ying W ★ 4.3k

You might want to see the answer to this post: Heatmap of RNA-seq data

Making a heatmap can be done in R using heatmap() function on logFC

0
Entering edit mode

Thanks Ying W. Did you use edgeR to get DEG list?

1
Entering edit mode

yes I used edgeR, you can do something like heatmap(x$table$logFC) however keep in mind seidel's comments. If you only have one comparison, your heatmap will only have on column and that might not be very meaningful. You should think first about what you are trying to show and what do you expect to learn from this heatmap. Heatmaps are often used to show differences between sets of conditions (ie FC from WT vs Transgenic 1 compared to FC from WT vs Transgenic 2)

0
Entering edit mode

Thanks a lot Ying W.

I really appreciate your help. This helps a lot.

Naresh

0
Entering edit mode

Hi Ying,

Can you please tell me how logFC value is calculated in edgeR. So I can confirm what does "+" and "-" value means in term of up or down regulation.

Naresh

0
Entering edit mode

For example, you're comparing two things: A and B, the fold change is A/B. If gene1 is 2-fold higher in A, the A/B ratio for gene1 is 2. If gene47 is 2-fold higher in B than A, the gene47 ratio is 0.5. EdgeR displays the log2 of the ratio. Therefore genes up or down by a given amount (i.e. two-fold) have the same distance from equality, but the sign changes. Thus gene1 would have logFC: 1, and gene47 would have logFC: -1, reflecting 2-fold up or down respectively. In log2 space the numbers are close enough to how we think about fold change to develop an intuition. For instance: -2 is 4-fold down, -1 is 2-fold down, 0 is equal in A and B ( a ratio of 1), 1 is 2-fold up, 2 is 4-fold up, etc.

3
Entering edit mode
10.9 years ago
seidel 11k

Just to be clear, you wouldn't create a heat map with those values, as they each represent different things. You would create a heat map using values of the same kind from several different experiments or samples. i.e. if you ran edgeR to get several comparisons, you would then extract out the logFC for all your comparisons to build a table of logFC values with logFC as the columns and genes as the rows. You would then extract a smaller table including values for the DE genes from any of the comparisons, and make a heat map out of that. As Ying W said, that couldbe done using the heatmap() function in R. Two other nice heatmap functions are: heatmap.2 from the gplots package, or the pheatmap package (pretty heat maps).

0
Entering edit mode

Thanks Seidel,

Thanks for your feedback. How to create heat map if I have only 1 comparison i.e. WT Vs Transgenic ?

Naresh.