WGCNA HeatMap correlating modules and sample conditions
1
0
Entering edit mode
5 months ago
Raito92 ▴ 60

Hello everyone, I'm new to WGCNA analysis... I'm trying to carry out one by using WGCNA Bioconductor Package. Being a newbie, I'm sticking to the official tutorial. In the Section 4 of the Tutorial it's explained how to create a heatmap correlating the previously obtained modules with sample quantitative traits (such as, for instance, phenotypical, measurable traits), as shown below:

enter image description here

However, I'd need a heatmap showing the correlations between the previously obtained modules and sample conditions instead. This will significantly help me to pick the most significant modules and further analyze them in Cytoscape, highlighting how they correlate with my experimental conditions immediately (for instance, the red module has a positive correlation with samples injected with the pathogen, the purple one with samples collected from root... and so on). The heatmap would look similar to this one (however, here the correlation is between modules and samples, not between modules and samples clustered by condition...from this other tutorial.

enter image description here

Any suggestions about how to create this kind of heatmap?

Thanks in advance for your help, have a nice day.

RNAseq heatmap WGCNA conditions clustering • 399 views
ADD COMMENT
2
Entering edit mode
5 months ago
Vincent Laufer ★ 2.2k

Sure,

  1. Grab modules from your WGCNA output
  2. Grab your sample names as well as relevant grouping / blocking variables (for use in clustering) from your metadata file.
  3. Find the appropriate arguments, and feed into pheatmap.

I think a different program was used to make the above HM (because the colors appear different than I am used to seeing from pheatmap), but you shouldn't have any trouble at all making a diagram that is identical except for stylistically.

ADD COMMENT
0
Entering edit mode

Hi, thank you for the (very quick!) answer. The official tutorial (first heatmap shown here) adopted labeledHeatmap. The second plot was created through ggplot.

Do you have a pheatmap usage example in a WGCNA context?

ADD REPLY
1
Entering edit mode

Hi again, no, I typically just create what I need.

In one of the WGCNA output files, you should have an object containing a list of all the sample IDs, then the cluster score for each. However this is formatted at present, you want to reformat it such that it is a matrix with row names being the gene module names and column names being the sample IDs. It's pretty likely that whatever output file you have is pretty close to that already. If not, paste the format of the output you do have as well as the format for the metadata you need in your original post and wee can go from there.

ADD REPLY

Login before adding your answer.

Traffic: 1509 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